public GameHandler (UIt uit, Controller ctrll) { ctrl = ctrll; ui = uit; playerList.Add (new HumanPlayer ()); playerList.Add (new AiPlayer ()); }
public string GetLeader (Controller ctrl) { if (ctrl.GetPlayers () [0].GetPoints () > ctrl.GetPlayers () [1].GetPoints ()) { return ctrl.GetPlayers () [0].GetName (); } else if (ctrl.GetPlayers () [0].GetPoints () < ctrl.GetPlayers () [1].GetPoints ()) { return ctrl.GetPlayers () [1].GetName (); } else { return "No one"; } }
public UIt () { this.ctrl = new Controller(); ctrl.AddPlayer ("OBAMA"); ctrl.AddPlayer ("TRUMP"); int boardsize = 15; word = new char[boardsize][]; for (int i = 0; i < boardsize; i++) { word[i] = new char[boardsize]; for (int p = 0; p < boardsize; p++) { word[i][p] = '#'; } } }
public void getState(Controller ctrl) { board = ctrl.GetBoard (); playerturn = ctrl.getTurn (); players = ctrl.GetPlayers (); }