public static Chessboard CreateChessboard(ChessManual chessManual)
 {
     Chessboard chessboard = new Chessboard();
     foreach (var step in chessManual.StepList)
     {
         SetNumber(chessboard,step);
     }
     return chessboard;
 }
Example #2
0
 private void LoadChessboard()
 {
     this.chessboard = ChessboardFactory.CreateChessboard("#1");
 }
Example #3
0
 private void ClearBtn_OnClick(object sender, RoutedEventArgs e)
 {
     this.chessboard = ChessboardFactory.CreateChessboard("#1");
 }
Example #4
0
 public Game(Chessboard chessboard,Player player)
 {
     this.Chessboard = chessboard;
     this.Player = player;
 }
Example #5
0
 public static Game CreateGame(Player player, Chessboard chessboard)
 {
     return new Game(chessboard, player);
 }
 private static void SetNumber(Chessboard chessboard, Step step)
 {
     chessboard.GetCell(step.Row, step.Column).SetNumber(step.Number);
 }