revamping domain

This commit is contained in:
2022-10-30 18:36:23 -05:00
parent b8ac227199
commit 689de35c3b
16 changed files with 161 additions and 105 deletions

View File

@@ -8,11 +8,11 @@ namespace Shogi.Domain;
/// The board is always from Player1's perspective.
/// [0,0] is the lower-left position, [8,8] is the higher-right position
/// </summary>
public sealed class Session
public sealed class ShogiBoard
{
private readonly StandardRules rules;
public Session(string name, BoardState initialState, string player1, string? player2 = null)
public ShogiBoard(string name, BoardState initialState, string player1, string? player2 = null)
{
Name = name;
Player1 = player1;
@@ -23,8 +23,6 @@ public sealed class Session
public BoardState BoardState { get; }
public string Name { get; }
public string Player1 { get; }
public string? Player2 { get; }
/// <summary>
/// Move a piece from a board position to another board position, potentially capturing an opponents piece. Respects all rules of the game.