Morpion Game Core - challenge client IA This project has created for learn to code for dev student.
This application is the simple core morpion game.
For play, each student must to coding client player. The client player must take the map via main parameters and return playing position.
- The return of core is json
- This json contain the actual map of game
- Example of map where player one named 1 and player two named 2. The pawn - is the empty place.
1 - 2 2 - - 1 1 -
- Example of return json by the core game:
[["1","-","2"],["2","-","-"],["1","1","-"]]
- Each position of map have a number, that the player may return for play
*** *** *** * 0 1 2 * * 3 4 5 * * 6 7 8 * *** *** ***
For a win, you have 04 combinaisons,
ONE
*** *** *** * 1 - - * * - 1 - * * - - 1 * *** *** ***
TWO
*** *** *** * - - - * * 1 1 1 * * - - - * *** *** ***
THREE
*** *** *** * - - 1 * * - 1 - * * 1 - - * *** *** ***
FOURTH
*** *** *** * - 1 - * * - 1 - * * - 1 - * *** *** ***
In this version, the core launch the scala client player; Why ? because my students coding in scala language.
You can modify this code easily.
java -jar name_of_core.jar name_of_client_one name_of_client_two
the core send in parameters, the actual map of game in json. the client must return the playing number position.
My bad english ;)