Browse Source

Eigene Klasse TicTacToeBrett angelegt

feature/tictactoe
Felix Detig 3 years ago
parent
commit
ba557643d5
  1. 2
      BlazorSolution/MiniGames/Client/ViewModel/TicTacToe.cs
  2. 13
      BlazorSolution/MiniGames/Shared/Models/TicTacToeBrett.cs
  3. 2
      BlazorSolution/MiniGames/Shared/Models/TicTacToeModel.cs
  4. 13
      BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs
  5. 11
      BlazorSolution/MiniGamesTests/TicTacToeTest.cs

2
BlazorSolution/MiniGames/Client/ViewModel/TicTacToe.cs

@ -11,7 +11,7 @@ namespace MiniGames.Client.ViewModel
this.Model = model; this.Model = model;
} }
public int[,] Brett
public TicTacToeBrett Brett
{ {
get { return Model.Brett; } get { return Model.Brett; }
set { Model.Brett = value; } set { Model.Brett = value; }

13
BlazorSolution/MiniGames/Shared/Models/TicTacToeBrett.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MiniGames.Shared.Models
{
public class TicTacToeBrett
{
int[,] Felder;
}
}

2
BlazorSolution/MiniGames/Shared/Models/TicTacToeModel.cs

@ -9,6 +9,6 @@ namespace MiniGames.Shared.Models
public class TicTacToeModel public class TicTacToeModel
{ {
public SpielerModel[] Spieler { get; set; } public SpielerModel[] Spieler { get; set; }
public int[,] Brett { get; set; }
public TicTacToeBrett Brett { get; set; }
} }
} }

13
BlazorSolution/MiniGamesTests/TicTacToeBrettTest.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MiniGamesTests
{
public class TicTacToeBrettTest
{
}
}

11
BlazorSolution/MiniGamesTests/TicTacToeTest.cs

@ -12,14 +12,9 @@ namespace MiniGamesTests
{ {
public class TicTacToeTest public class TicTacToeTest
{ {
int[,] StandardBrett()
TicTacToeBrett StandardBrett()
{ {
return new int[,]
{
{ -1, -1, -1, },
{ -1, -1, -1, },
{ -1, -1, -1, },
};
return new TicTacToeBrett();
} }
SpielerModel[] StandardSpieler() SpielerModel[] StandardSpieler()
@ -54,7 +49,7 @@ namespace MiniGamesTests
{ {
// arrange // arrange
TicTacToe spiel = new(StandardModel()); TicTacToe spiel = new(StandardModel());
int[,] brett = spiel.Brett;
TicTacToeBrett brett = spiel.Brett;
bool erwartetGesetzt = gesetzt; bool erwartetGesetzt = gesetzt;
// act // act

Loading…
Cancel
Save