-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequirement.txt
More file actions
40 lines (32 loc) · 1.57 KB
/
Requirement.txt
File metadata and controls
40 lines (32 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Tic-Tac-Toe Game
Problem Statement
Design a tic-tac-toe game that has two modes
Pattern based
First user places X on any position and the second player places O
X | O |
--+---+--
| O |
--+---+--
| X |
The first player to get his a row, column or diagonal filled with his pattern wins.
Number based
First user places any of the odd numbers from 1 to 9 and the second player uses even numbers from 2 to 8
6 | 3 |
--+---+--
| 1 |
--+---+--
| 4 |
First player to get a sum of 15 on any row, column or diagonal wins (The row or column or diagonal can contain numbers entered by other player as well)
Each digit should be entered only once and cannot be repeated
The application should ask for the mode and proceed with the game accordingly.
After each step the application responds with 3 possibilities.
• Continue (The game should continue)
• Won (The player has met the criteria for win)
• Draw (No more positions available)
As a next level one should implement a single player mode, where the computer plays as the second player. It is assumed that the computer will place the best move possible.
Evaluation Criteria
• The code works and produces correct results
• The code is modular, extensible, readable and logic easily understood (self documented)
• Implementing Unit Tests gives additional bonus
• The application should be console based. No UI expected.
• Use virtualenv/requirements.txt or pipenv/Pipfile to enable easy evaluation.