Fixed accidentally building the board from player2 perspective.
This commit is contained in:
6
Gameboard.ShogiUI.Domain/Entities/Board.cs
Normal file
6
Gameboard.ShogiUI.Domain/Entities/Board.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Gameboard.ShogiUI.Domain
|
||||
{
|
||||
public class Board
|
||||
{
|
||||
}
|
||||
}
|
||||
30
Gameboard.ShogiUI.Domain/Entities/Match.cs
Normal file
30
Gameboard.ShogiUI.Domain/Entities/Match.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace Gameboard.ShogiUI.Domain
|
||||
{
|
||||
public class Match
|
||||
{
|
||||
public string Name { get; }
|
||||
public string Player1 { get; }
|
||||
public string Player2 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initialize pre-existing Match.
|
||||
/// </summary>
|
||||
public Match(MatchMeta meta, Board board)
|
||||
{
|
||||
Name = meta.Name;
|
||||
Player1 = meta.Player1;
|
||||
Player2 = meta.Player2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Match.
|
||||
/// </summary>
|
||||
public Match(string name, string player1)
|
||||
{
|
||||
Name = name;
|
||||
Player1 = player1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
7
Gameboard.ShogiUI.Domain/Gameboard.ShogiUI.Domain.csproj
Normal file
7
Gameboard.ShogiUI.Domain/Gameboard.ShogiUI.Domain.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
15
Gameboard.ShogiUI.Domain/ValueObjects/Class1.cs
Normal file
15
Gameboard.ShogiUI.Domain/ValueObjects/Class1.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Gameboard.ShogiUI.Domain
|
||||
{
|
||||
public class MatchMeta
|
||||
{
|
||||
public string Name { get; }
|
||||
public string Player1 { get; }
|
||||
public string Player2 { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user