multiplayer pong game for LPC 1768
Dependencies: mbed MbedJSONValue mbed-rtos Adafruit_ST7735 Adafruit_GFX EthernetInterface DebouncedInterrupt
Diff: gamestate.h
- Revision:
- 37:8a0fc62a0512
- Parent:
- 36:46bb54b669bc
diff -r 46bb54b669bc -r 8a0fc62a0512 gamestate.h --- a/gamestate.h Sat Nov 28 04:21:08 2020 +0000 +++ b/gamestate.h Sun Nov 29 22:40:24 2020 +0000 @@ -16,33 +16,32 @@ class Graphics; class GameState { - // TODO: make the syntax consistent please private: Coord p1_loc; Coord p2_loc; Coord ball_loc; char is_done; char has_started; - int countdown; char localPlayerNum; char lobbyHash[21]; + int countdown; int score[2]; public: GameState(); - Coord getPlayerLocation(char player); Coord getPlayerOneLocation(); Coord getPlayerTwoLocation(); + Coord getPlayerLocation(char player); Coord getBallLocation(); char *getLobbyHash(); char getLocalPlayerNum(); - int getCountdown(); char hasStarted(); - void setCountdown(int val); + char done(); + int getCountdown(); int getPlayerOneScore(); int getPlayerTwoScore(); int getPlayerScore(int player); + void setCountdown(int val); void updateAndRender(MbedJSONValue *serverResponse, Graphics *gfx); - char done(); }; #endif // GAME_STATE_H \ No newline at end of file