mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
Add PlayerNumber
This commit is contained in:
@@ -17,13 +17,20 @@ internal class Game
|
||||
_io.Write(Resource.Streams.Rules);
|
||||
}
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
_io.Write(Resource.Streams.HereWeGo);
|
||||
|
||||
var (playerCount, rowCount, columnCount) = _io.ReadParameters();
|
||||
|
||||
var cookie = new Cookie(rowCount, columnCount);
|
||||
var player = new PlayerNumber(playerCount);
|
||||
|
||||
_io.WriteLine(cookie);
|
||||
|
||||
_io.WriteLine(string.Format(Resource.Formats.Player, player));
|
||||
var (row, column) = _io.Read2Numbers(Resource.Prompts.Coordinates);
|
||||
|
||||
if (_io.ReadNumber("Again (1=Yes, 0=No!)") != 1) { break; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user