Class Main

java.lang.Object
castle.comp3021.assignment.Main

public class Main
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Main()  
  • Method Summary

    Modifier and Type Method Description
    static Game createGame​(int size, int numMovesProtection)
    Create and initialize a game.
    static void main​(java.lang.String[] args)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • createGame

      public static Game createGame​(int size, int numMovesProtection)
      Create and initialize a game. Student should first construct a Configuration object with two players. Then add initial pieces to gameboard in the Configuration object. After that, use this Configuration object to construct a JesonMor game object This method should return the created JesonMor object.

      The initialized gameboard should comply to the requirements of the assignment. The user player should be put first in the player array in the configuration and user player should moves first. Attention: The code in this method is only an example of using Configuration to initialize gameboard, Students should remove them and implement on their own.

      Parameters:
      size - size of gameboard
      numMovesProtection - number of moves with capture protection
      Returns:
      the game object
    • main

      public static void main​(java.lang.String[] args)