-
Notifications
You must be signed in to change notification settings - Fork 2
Design Document
chatton edited this page Mar 8, 2018
·
8 revisions
Chess Online is ...
Spring Boot Framework / Java juint React JS / WebPack / Yarn Bootstrap /css / html5 & canvas / js / jquery Python 3 / unittest / pydoc Hibernate (Database) MySQL Maven photoshop git/github
Spring Boot Java server
Endpoints provided
/chess/v1/register/ POST
/chess/v1/login/ POST
/chess/v1/newgame/ GET
{
"gameId": 519955473,
"playerId": 1,
"colour": "WHITE"
}/chess/v1/gamestate GET
{
"positions": {
"G1": "wKnight",
"G2": "wPawn",
"E1": "wKing",
"E2": "wPawn",
"C1": "wBishop",
"C2": "wPawn",
"A1": "wRook",
"G7": "bPawn",
"A2": "wPawn",
"G8": "bKnight",
"E7": "bPawn",
"E8": "bKing",
"C7": "bPawn",
"C8": "bBishop",
"A7": "bPawn",
"A8": "bRook",
"H1": "wRook",
"H2": "wPawn",
"F1": "wBishop",
"F2": "wPawn",
"D1": "wQueen",
"D2": "wPawn",
"B1": "wKnight",
"H7": "bPawn",
"B2": "wPawn",
"H8": "bRook",
"F7": "bPawn",
"F8": "bBishop",
"D7": "bPawn",
"D8": "bQueen",
"B7": "bPawn",
"B8": "bKnight"
},
"gameStatus": "WAITING",
"message": null,
"winner": null,
"currentTurn": "WHITE",
"yourColour": "WHITE",
"lastMove": {},
"check": {
"WHITE": {
"inCheck": "false",
"location": "E1"
},
"BLACK": {
"inCheck": "false",
"location": "E8"
}
}
}chess/v1/allgames GET
[
{
"whitePlayerName": "bob",
"blackPlayerName": null,
"gameId": 1095076708,
"currentTurn": "WHITE",
"gameStatus": "WAITING"
},
{
"whitePlayerName": "bob",
"blackPlayerName": null,
"gameId": 590100094,
"currentTurn": "WHITE",
"gameStatus": "WAITING"
},
{
"whitePlayerName": "jim",
"blackPlayerName": "bob",
"gameId": 1365192635,
"currentTurn": "BLACK",
"gameStatus": "ONGOING"
}
]chess/v1/makemove POST
connected to a MySQL database Serving up a React JS app as the root resource Python bot that connects to the HTTP api as a user.