Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1022 Bytes

README.rdoc

File metadata and controls

39 lines (28 loc) · 1022 Bytes

DESCRIPTION OF THE PROBLEM

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).

SPECIFICATION

  • 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

EXAMPLE GAME

  • 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.

THE SOLUTION

Structure

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