Snake battle is an exercise for practicing teamwork (and coding). Your task is to develop a CPU player that controls a snake in a classic snake game. The snake has two goals:
- Eat as much food as possible
- Stay alive by avoiding obstacles
The repository contains a full snake game, but the snake is just a dummy. Your job is to make it smart.
The game is a C# console app (.NET 6).
- The participants are divided into teams of 2-3 persons.
- Each team gathers to implement their snake collaboratively, using one computer per team.
- In the end, all the snakes are placed on the same map, and a set of rounds is played. The team whose snake eats most food in total wins.
- We’ll play 3 rounds.
- A round ends when all snakes have died (or if 1 minute passes without any snake eating food).
- The snake who eats most food in total during all the rounds wins.
- Clone this repository.
- Open the solution in Visual Studio.
- Create a branch for your team.
- Duplicate file Domain/Player/PlayerTemplate.cs and rename the copy (both the class and the file) as you like. The game will automatically detect the new class and use it to control the snake.
- Run the app to see how the game looks.
- Start modifying your player class by following the instructions in the file.
- When the time is up, commit and push your player file. Do not commit any other changes.
- Create a pull request for merging your branch into the main branch. Add the facilitator of the event as the reviewer.
- Start simple.
- Don’t aim for too advanced solutions. We don’t have time for that.
- If your snake doesn’t work as expected, add a breakpoint in your player class and start debugging.
- Note that if your player throws an unhandled exception, the game won’t crash, but your snake will just keep going forward silently.
- Contact the facilitator if you have technical issues.
- Complete the pull requests created by the teams and make sure all the newly created player classes are placed in Domain/Player/ folder.
- In ConsoleApp/config.json, set "TestMode" to false.
- Run the solution.