diff --git a/BlazorSolution/MiniGames/Client/ViewModel/TicTacToe.cs b/BlazorSolution/MiniGames/Client/ViewModel/TicTacToe.cs index a086f3f..611c364 100644 --- a/BlazorSolution/MiniGames/Client/ViewModel/TicTacToe.cs +++ b/BlazorSolution/MiniGames/Client/ViewModel/TicTacToe.cs @@ -26,6 +26,7 @@ namespace MiniGames.Client.ViewModel public void SpielerInput(int posIndex) { Brett.Set(posIndex, AktiverSpielerIndex); + SpielerWechsel(); } public void SpielerWechsel() diff --git a/BlazorSolution/MiniGamesTests/TicTacToeTest.cs b/BlazorSolution/MiniGamesTests/TicTacToeTest.cs index fb94e6f..cefd005 100644 --- a/BlazorSolution/MiniGamesTests/TicTacToeTest.cs +++ b/BlazorSolution/MiniGamesTests/TicTacToeTest.cs @@ -64,6 +64,9 @@ namespace MiniGamesTests { // arrange TicTacToe spiel = StandardSpiel(); + spiel.AktiverSpielerIndex = 0; + int erwarteterSpielerIndex = 1; + int pos = 2; TicTacToeBrett erwartetesBrett = new(new int[,] { @@ -77,6 +80,7 @@ namespace MiniGamesTests // assert Assert.True(spiel.Brett.Gleich(erwartetesBrett)); + Assert.Equal(erwarteterSpielerIndex, spiel.AktiverSpielerIndex); } } }