예제 #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     game.stop = false;
     if (gametype == 0)
     {
         game = new ChessGame("player1", "player2");
     }
     else
     {
         game = new GoGame("player1", "player2");
     }
     this.Refresh();
 }
예제 #2
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.SelectedIndex == 0)
     {
         gametype = 0;
         game     = new ChessGame("player1", "player2");
         this.Refresh();
     }
     else
     {
         gametype = 1;
         game     = new GoGame("player1", "player2");
         this.Refresh();
     }
 }
예제 #3
0
 public King(Color color, GameBoard board, ChessGame game) : base(color, board)
 {
     this.game = game;
 }
예제 #4
0
 public King(Board board, Color color, ChessGame game) : base(board, color)
 {
     this.game = game;
 }