Google
Web alhem.net
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Player.cpp

Go to the documentation of this file.
00001 00006 /* 00007 Copyright (C) 2004 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #include <stdincl.h> 00024 00025 #include "Player.h" 00026 00027 00028 00029 Player::Player() 00030 :m_num(0) 00031 ,m_name("") 00032 ,m_riktning(0) 00033 ,m_xpos(0) 00034 ,m_ypos(0) 00035 { 00036 } 00037 00038 00039 Player::Player(long num) 00040 :m_num(num) 00041 ,m_name("") 00042 ,m_riktning(0) 00043 ,m_xpos(0) 00044 ,m_ypos(0) 00045 { 00046 } 00047 00048 00049 Player::Player(long num,const string &name) 00050 :m_num(num) 00051 ,m_name(name) 00052 ,m_riktning(0) 00053 ,m_xpos(0) 00054 ,m_ypos(0) 00055 { 00056 } 00057 00058 00059 Player::~Player() 00060 { 00061 } 00062 00063 00064 long Player::GetNum() 00065 { 00066 return m_num; 00067 } 00068 00069 00070 const char *Player::GetName() 00071 { 00072 return m_name.c_str(); 00073 } 00074 00075 00076 void Player::SetRiktning(int r) 00077 { 00078 m_riktning = r; 00079 } 00080 00081 00082 void Player::SetXY(long x,long y) 00083 { 00084 m_xpos = x; 00085 m_ypos = y; 00086 } 00087 00088 00089 long Player::GetX() 00090 { 00091 return m_xpos; 00092 } 00093 00094 00095 long Player::GetY() 00096 { 00097 return m_ypos; 00098 } 00099 00100 00101 void Player::SetName(const string &str) 00102 { 00103 m_name = str; 00104 } 00105 00106

Generated for SDL C++ GUI by doxygen 1.3.6