CodinGame / SpringChallenge2020

19 stars 10 forks source link

How to run this code locally? #1

Open shpotes opened 4 years ago

shpotes commented 4 years ago

I can't find the runner code. There is a way to run this game locally?

nantoniazzi commented 4 years ago

You can take this documentation https://www.codingame.com/playgrounds/25775/codingame-sdk-documentation/create-a-multiplayer-game as example using this repository.

For the main, you can just create a Main file like this one: https://github.com/CodinGame/game-tictactoe/blob/master/src/test/java/Main.java

piter239 commented 4 years ago

You can take this documentation https://www.codingame.com/playgrounds/25775/codingame-sdk-documentation/create-a-multiplayer-game as example using this repository.

For the main, you can just create a Main file like this one: https://github.com/CodinGame/game-tictactoe/blob/master/src/test/java/Main.java

Thanks, that helped a lot!

Now I actually can run the game locally, and watch my code play agains itself of against the boss.

Is there any documentation or tips on how I can adapt the Main to let just play the games and write the results to a file, without the Viewer?

UPD: Sorry, I found the documentation!

It is here

https://www.codingame.com/playgrounds/25775/codingame-sdk-documentation/game-runner

under TESTING