Ejemplo n.º 1
0
 public GameViewModel()
 {
     TileViewModel[] tiles = {
         new TileViewModel(0, 0),
         new TileViewModel(1, 0),
         new TileViewModel(2, 0),
         new TileViewModel(0, 1),
         new TileViewModel(1, 1),
         new TileViewModel(2, 1),
         new TileViewModel(0, 2),
         new TileViewModel(1, 2),
         new TileViewModel(2, 2)
     };
     Board = new BoardViewModel(tiles);
 }
Ejemplo n.º 2
0
 public void YTotalTest(IEnumerable<int> yValues, int expected)
 {
     var tiles = yValues.Select(y => new TileViewModel(1, y));
     var viewmodel = new BoardViewModel(tiles);
     Assert.Equal(expected, viewmodel.TotalY);
 }
Ejemplo n.º 3
0
 public void XTotalTest(IEnumerable<int> xValues, int expected)
 {
     var tiles = xValues.Select(x => new TileViewModel(x, 1));
     var viewmodel = new BoardViewModel(tiles);
     Assert.Equal(expected, viewmodel.TotalX);
 }