Browse Source

Refactored TicTacToeBrett.Set

feature/tictactoe
Felix Detig 3 years ago
parent
commit
018054276f
  1. 13
      BlazorSolution/MiniGames/Shared/Models/TicTacToeBrett.cs

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

@ -50,17 +50,18 @@ namespace MiniGames.Shared.Models
try
{
if (Felder[x, y] != LEER)
return false;
if (Felder[x, y] == LEER)
{
Felder[x, y] = wert;
return true;
}
}
catch (IndexOutOfRangeException e)
{
return false;
// absichtlich leer
}
Felder[x, y] = wert;
return true;
return false;
}
public bool Voll()

Loading…
Cancel
Save