public CellVM(Cell c, GameBusinessLogic businessLogic) { cell = c; this.businessLogic = businessLogic; CellWidth = 58.3333321f; CellHeight = 50.8888f; }
public GameVM() { ObservableCollection <ObservableCollection <Cell> > board = Utilities.InitGameBoard(); this.businessLogic = new GameBusinessLogic(ref board); this.GameBoard = CellBoardToCellVMBoard(ref board); this.WindowHeight = 700; this.WindowWidth = 1200; }
public GameVM() { InitialGameStatus = new GameStatusVM(System.IO.Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName + "/Resources/SatrtGame.txt"); Board = Helper.ConvertIntegerMatrixToSquareMatrix(InitialGameStatus.Status.GameBoard); bl = new GameBusinessLogic(Board); GameBusinessLogic.CurrentPlayer = (Type)InitialGameStatus.Status.CurrentPlayer; GameBusinessLogic.NumberOfRedPieces = InitialGameStatus.Status.NumberOfRedPieces; GameBusinessLogic.NumberOfBlackPieces = InitialGameStatus.Status.NumberOfBlackPieces; GameBoard = Helper.CellBoardToCellVMBoard(Board, bl); }
public static void ResetGame() { Board = Helper.ConvertIntegerMatrixToSquareMatrix(InitialGameStatus.Status.GameBoard); bl = new GameBusinessLogic(Board); for (int line = 0; line < BOARD_DIMMENSION; line++) { for (int column = 0; column < BOARD_DIMMENSION; column++) { GameBoard[line][column].SimpleSquare.Type = Board[line][column].Type; } } GameBusinessLogic.CurrentPlayer = (Type)InitialGameStatus.Status.CurrentPlayer; GameBusinessLogic.NumberOfRedPieces = InitialGameStatus.Status.NumberOfRedPieces; GameBusinessLogic.NumberOfBlackPieces = InitialGameStatus.Status.NumberOfBlackPieces; }
public GameVM() { ObservableCollection <ObservableCollection <Cell> > board = Helper.InitBoard(); bl = new GameBusinessLogic(board); GameBoard = CellBoardToCellVMBoard(board); menuServices = new MenuServices(); Player player = Helper.InitPlayer(); CurrentPlayer = new PlayerVM(player); PlayerWhite = new PlayerVM(Helper.PlayerWhite); PlayerRed = new PlayerVM(Helper.PlayerRed); Winner = new PlayerVM(Helper.Winner); }
public CellVM(int x, int y, string color, Piece piece, GameBusinessLogic bl) { SimpleCell = new Cell(x, y, color, piece); this.bl = bl; }
public SquareVM(Square square, GameBusinessLogic bl) { SimpleSquare = square; this.bl = bl; }
public GameVM() { ObservableCollection<ObservableCollection<Cell>> board = Helper.InitGameBoard(); bl = new GameBusinessLogic(board); GameBoard = CellBoardToCellVMBoard(board); }
public CellVM(int x, int y, string hidden, string displayed, GameBusinessLogic bl) { SimpleCell = bl.cells[x][y]; this.bl = bl; }
private void UpdateBoard(object param) { GameBusinessLogic.UpdateGame(this); }