Skip to content

ktatomir/penalty-kicks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published