Пример #1
0
 public override void PlayLocal()
 {
     localInterface = null;
     ClearAllSquares();
     twoPlayers = true;
     blackPlayer = new LocalPlayer(PieceColor.BLACK, null);
     whitePlayer = new LocalPlayer(PieceColor.WHITE, null);
     turn = Turn.LOCAL_BLACK;
     moveLabel.Text = "";
     turnLabel.Text = "Black's turn.";
     NewGameMenuUpdate(true, false, false);
 }
Пример #2
0
 public override void PlayServer(NetworkInterface comm)
 {
     comm.Disconnected += new OpponentDisconnected(comm_Disconnected);
     localInterface = comm;
     ClearAllSquares();
     twoPlayers = false;
     NetworkPlayer p = new NetworkPlayer(PieceColor.BLACK);
     blackPlayer = p;
     whitePlayer = new LocalPlayer(PieceColor.WHITE, comm);
     comm.Handler = new OmokPacketHandler(p, this);
     turn = Turn.NETWORK_OPPONENT_BLACK;
     moveLabel.Text = "";
     turnLabel.Text = "Black's turn.";
     NewGameMenuUpdate(false, true, true);
 }
Пример #3
0
 public override void PlayFromSave()
 {
     localInterface = null;
     twoPlayers = true;
     blackPlayer = new LocalPlayer(PieceColor.BLACK, null);
     whitePlayer = new LocalPlayer(PieceColor.WHITE, null);
     moveLabel.Text = "";
     turnLabel.Text = (turn == Turn.LOCAL_BLACK ? "Black" : "White") + "'s turn.";
     NewGameMenuUpdate(true, false, false);
 }