Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
game.cpp
00001 #include "Sprite.h" 00002 00003 Sprite::Sprite(){ 00004 m_x = 0; 00005 m_y = 0; 00006 } 00007 00008 Sprite::Sprite(int x, int y){ 00009 m_x = 0; 00010 m_y = 0; 00011 } 00012 00013 void Sprite::setX(int x){ 00014 m_x = x; 00015 } 00016 00017 void Sprite::setY(int y){ 00018 m_y = y; 00019 } 00020 00021 int Sprite::getX(){ 00022 return m_x; 00023 } 00024 00025 int Sprite::getY(){ 00026 return m_y; 00027 } 00028 00029 bool Sprite::hitBy(Sprite another){ 00030 return m_x == another.getX() && m_y == another.getY(); 00031 }
Generated on Sun Aug 7 2022 05:10:42 by
1.7.2