multiplayer pong game for LPC 1768
Dependencies: mbed MbedJSONValue mbed-rtos Adafruit_ST7735 Adafruit_GFX EthernetInterface DebouncedInterrupt
gamestate.h
- Committer:
- vsoltan
- Date:
- 2020-11-12
- Revision:
- 15:9d90f68e53da
- Child:
- 17:32ae1f106002
File content as of revision 15:9d90f68e53da:
#ifndef GAME_STATE_H #define GAME_STATE_H #include "mbed.h" #include "stdint.h" struct Coord { int8_t x; int8_t y; }; class GameState { private: Coord p1_loc; Coord p2_loc; Coord ball_loc; bool is_done; public: GameState(); Coord getPlayerOneLocation(); Coord getPlayerTwoLocation(); Coord getBallLocation(); void update(char *server_data); bool done(); }; #endif // GAME_STATE_H