Skip to content

Encorpluptit/CPE_matchstick_2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPE_matchstick_2018

Leave the last matchstick ! (End of project 23/06/19)

Experience in C : 4 months.

The project

Project subject.

The goal of the project is to create a program that you can play against.

The basic version must generate a game board withnmatchstick lines (1 < n < 100) and have a simple inter-face so that the user could play against the computer.

The number of lines is given as parameter to the program.

The second parameter of the program indicates the maximum number of matches that can be taken outeach turn (must be > 0).

When matchsticks are removed, they must be removed starting from the right (like in the example below).

The user will always start the game.

The program’s output (error messages included) must correspond to the examples below.

Error messages which happens during a game and which are destined to the player must be displayed on the standardoutput.

In case of bad input, you must ask for the line by displaying “Line:” again, and it’s up to the player to indicate again the line he/she wants to play on.

Example

Game Example Game Example

Results:

95.9% functional :

Nao Marvin Results

100.00% 01 - Initial display of 4x4 board (3 tests)

100.00% 02 - Bad inputs (12 tests)

100.00% 03 - Full games (20 tests)

100.00% 03.5 - More full games (4 tests)

80.00% 04 - AI effectiveness (10 tests)

About

Leave the last matchstick ! (End of project 23/06/19)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published