Skip to content
Ankur rai edited this page Feb 14, 2018 · 6 revisions

Game

Properties

  • Players it contains Players details.
  • Battlefield it contains all positions of Battlefield.
  • Current player it contains current player index.

Methods

  • setArmyOf takes team and piece positions and deploy them to the there respective positions.
  • getBattleFieldOf takes team and give their respective battlefield.
  • changeTurn it changes current player.
  • hasWon whether current player is winner or not.
  • addPlayer it adds player in current game.
  • getPotentialMove provide potential move of given piece location.
  • battle do battle between two playing pieces.

Clone this wiki locally