Synchronise Wiki and Model
continuous-integration/drone/push Build is passing Details

pull/81/head
Alexis Drai 2 years ago
parent 535631e0e1
commit de7062e81d

@ -22,7 +22,7 @@ namespace Model.Games
this.games = games ?? new(); this.games = games ?? new();
} }
public IEnumerable<Game> GetAll() => games.AsEnumerable(); public IEnumerable<Game> GetAllGames() => games.AsEnumerable();
/// <summary> /// <summary>
/// finds the game with that name and returns it /// finds the game with that name and returns it
@ -40,5 +40,25 @@ namespace Model.Games
} }
throw new ArgumentException("param should not be null or blank", nameof(name)); throw new ArgumentException("param should not be null or blank", nameof(name));
} }
public void SaveGame(Game game)
{
throw new NotSupportedException();
}
public Game LoadGame(string name)
{
throw new NotSupportedException();
}
public void StartNewGame()
{
throw new NotSupportedException();
}
public void DeleteGame(Game game)
{
throw new NotSupportedException();
}
} }
} }

@ -33,7 +33,8 @@ namespace Model.Games
/// <summary> /// <summary>
/// the collection of Face that were rolled /// the collection of Face that were rolled
/// </summary> /// </summary>
public Dictionary<AbstractDie<AbstractDieFace>, AbstractDieFace> DiceNFaces { get; } public IEnumerable<KeyValuePair<AbstractDie<AbstractDieFace>, AbstractDieFace>> DiceNFaces => diceNFaces.AsEnumerable();
private readonly Dictionary<AbstractDie<AbstractDieFace>, AbstractDieFace> diceNFaces;
/// <summary> /// <summary>
/// this private constructor is to be used only by factories /// this private constructor is to be used only by factories
@ -45,7 +46,7 @@ namespace Model.Games
{ {
When = when; When = when;
Player = player; Player = player;
DiceNFaces = diceNFaces; this.diceNFaces = diceNFaces;
} }
/// <summary> /// <summary>
@ -107,7 +108,7 @@ namespace Model.Games
date, date,
time, time,
Player.ToString()); Player.ToString());
foreach (AbstractDieFace face in DiceNFaces.Values) foreach (AbstractDieFace face in this.diceNFaces.Values)
{ {
sb.Append(" " + face.ToString()); sb.Append(" " + face.ToString());
} }

Loading…
Cancel
Save