Skip to content

Feat: Mine Game Mode#55

Open
saeidalz13 wants to merge 19 commits into
mainfrom
mine
Open

Feat: Mine Game Mode#55
saeidalz13 wants to merge 19 commits into
mainfrom
mine

Conversation

@saeidalz13
Copy link
Copy Markdown
Owner

@saeidalz13 saeidalz13 commented Jul 19, 2024

Overview

This PR introduces a new game mode called "Mine Mode". If this game mode selected by the host, a mine, which will end the game upon attacking its position, will be randomly put in the defence grid of both of the players.

Technical Features

  • Added constants for game mode (type uint8).
  • Added a field to ReqCreateGame JSON as game_mode with uint8 type.
  • Added a new position state called PositionStateMine set to largest uint8 number (255).
  • Added PlantMineInDefenceGrid method for Player interface.
  • Added extra methods to Game struct to handle the new game mode.
  • Modified HandleAttack request handler.
  • Developed unit tests for mine mode.
  • Changed filename handlers_api.go to handlers.go.

@saeidalz13 saeidalz13 requested a review from mori-ahk July 19, 2024 16:15
@saeidalz13 saeidalz13 self-assigned this Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant