Added Backend Classes and FUnctions for an working Game. But lacking Implementations
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using API.Models.DataClasses;
|
||||
|
||||
namespace API.Models.Game
|
||||
{
|
||||
public enum GameState
|
||||
{
|
||||
Lobby,
|
||||
Running,
|
||||
Ended
|
||||
}
|
||||
|
||||
public class Game
|
||||
{
|
||||
public string Id { get; init; } = Guid.NewGuid().ToString();
|
||||
public SixDigitInt GameCode { get; }
|
||||
public string?[] PlayerConnectionIds { get; set; } = new string?[2];
|
||||
public GameState State { get; private set; } = GameState.Lobby;
|
||||
public GameField Field { get; }
|
||||
|
||||
public Game(Coordinates gFs, SixDigitInt gameCode)
|
||||
{
|
||||
Field = new GameField(gFs);
|
||||
GameCode = gameCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user