mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
Move full time messages to game loop
This commit is contained in:
@@ -13,11 +13,12 @@ internal class Scoreboard
|
||||
_scores = new() { [home] = 0, [visitors] = 0 };
|
||||
Home = home;
|
||||
Visitors = visitors;
|
||||
Offense = home; // temporary value till first center jump
|
||||
_io = io;
|
||||
}
|
||||
|
||||
public bool ScoresAreEqual => _scores[Home] == _scores[Visitors];
|
||||
public Team? Offense { get; set; }
|
||||
public Team Offense { get; set; }
|
||||
public Team Home { get; }
|
||||
public Team Visitors { get; }
|
||||
|
||||
@@ -35,8 +36,6 @@ internal class Scoreboard
|
||||
Display();
|
||||
}
|
||||
|
||||
public void StartPeriod() => Offense = null;
|
||||
|
||||
public void Turnover(string? message = null)
|
||||
{
|
||||
if (message is not null) { _io.WriteLine(message); }
|
||||
|
||||
Reference in New Issue
Block a user