Пример #1
0
		public GameHandler (UIt uit, Controller ctrll)
		{
			ctrl = ctrll;
			ui = uit;
			playerList.Add (new HumanPlayer ());
			playerList.Add (new AiPlayer ());
		}
Пример #2
0
		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";
			}
		}
Пример #3
0
		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] = '#';
				}
			}
		}
Пример #4
0
		public void getState(Controller ctrl)
		{
			board = ctrl.GetBoard ();
			playerturn = ctrl.getTurn ();
			players = ctrl.GetPlayers ();
		}