Updated with almost everything necessary to play the tournament. I still need to implement the game timer per side. I will have the up before AI class meets Monday.
All of the changes that are mentioned in the Tournament Rules document have been completed with the following notes:
- Always 3 players per team
- Not guaranteed to be solvable (though I haven’t seen an unsolvable one yet).
- You can only capture flags on the other side of the board
- Flags respawn at random locations on your side of the map
- You can only see your flags when they have not been captured
- Non-wall squares you cannot see will be sent as a ‘*’
- Captured players will spawn adjacent to their home base
- If no location is available, they will try further out in concentric circles
Behavior of respawning flags:
- If the original location is occupied by a player that can pick up the flag, they will immediately.
- If the original location is occupied by a player that can not pick up the flag (wrong team or already holding a flag), the flag will spawn in a nearby available square.
- This may change in class today, if so the server will be updated to match the requirements in class.
Also, the timer has been implemented. Once you have used your 3 minutes, the server will not ask you to take another turn
Finally, changes from today’s class:
- Enable random seeds for tournaments (0 to use time)
- Add flag spawn points
- Players can move onto enemy spawns
- Players cannot move onto their own spawns
- Flag carrying players cannot move onto spawns.
- Bases and flag spawns have vision of eight adjacent
- Players have Manhattan vision of 4 (as opposed to old vision algorithm)
- Display fog of war with non-constant players
- Add board state to YourTurn
- Add remaining time messages
New packets of interest:
CreateTournament
- Creates a new tournament map with the given seed.
- Use 0 to use the server’s system time as a seed.
SetConstantPlayer
- For the server to always treat you as player 0.
- Will flip the board so that you are on the left.
RequestScores
- Should return each teams current score.
- Your teams score should be first followed by your opponents
Downloads