Write a game of penalty shoots in soccer. Game should consist of a server and a client. Client should send a request to the server, in which the player should specify a place, where he/she ‘kicks’ the ball. Server should, before receiveing this request, draw a place that it will be defending. Then compare the drawed place with the one player choosed and return score (win or loose, goal or defence).
-
Communication through API, HTTP
-
Goal size is 4x4
-
One game consists of 5 shots
-
Application should not be too complex, so do not overdo it
-
Player sends to the server a shot in point 1x3
-
Server draws a defending position - point 2x3
-
Above points are not the same, so the player gains a score for goal
-
Player sends to the server a shot in point 2x3
… etc.
Game:
-
id:int
-
timestamps
-
palyer_name:string
-
scores:int
Shot:
-
id:int
-
type:string
-
game_id:int, index
-
timestamps
-
x_pos:int
-
y_pos:int