Networked Battleship
Our team, consisting of Ryan Quinn (B), Kitti Tiamsuwan (B), and Nathan Daniel (A), created a battleship game that allows two players to play against each other from anywhere in the World. We made use of a central server to do this, with one player acting as the 'host', and the other as the 'client'.
First, the host creates a game with an ID of their choosing, and places their ships. Then, the client inputs this game ID and places their own ships. From here, each player takes turns firing until one player has no more in tact ships.
You need an Ethernet Adapter, LCD Screen, and Joystick.
The server code is available here https://github.com/ApolloFortyNine/battleship , and is written in Python3, using Flask and Redis.
The player code is available here https://developer.mbed.org/users/ndaniel7/code/Ethernet_Battleship/
Joystick | mbed |
---|---|
Vcc | Vout |
Vert | p17 |
Horz | p19 |
Gnd | Gnd |
LCD | mbed |
---|---|
VCC | 5v |
Gnd | Gnd |
RX | p28 |
TX | p27 |
Reset | p29 |
Ethernet | Mbed |
---|---|
P1 | TD+ |
P2 | TD- |
P8 | RD- |
P7 | RD+ |
Please log in to post comments.