Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a415a2292 | |||
| e2a8b771d9 | |||
| 0431fb2950 | |||
| 83dd4cc4a3 | |||
| 1ed1ad09af | |||
| 964f3bfb30 | |||
| fe4b013ed0 | |||
| e87bdf8b52 | |||
| fbdaf29f43 | |||
| b5c6b8244d | |||
| 48ab8f7964 |
120
BoardRules/BoardRules.cs
Normal file
120
BoardRules/BoardRules.cs
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
//using System.Drawing;
|
||||||
|
//using System.Numerics;
|
||||||
|
|
||||||
|
//namespace BoardRules;
|
||||||
|
|
||||||
|
//public static class PieceMoves
|
||||||
|
//{
|
||||||
|
// public static readonly ICollection<Vector2> GoldGeneralMoves =
|
||||||
|
// [
|
||||||
|
// new(-1, 1),
|
||||||
|
// new(0, 1),
|
||||||
|
// new(1, 1),
|
||||||
|
// new(-1, 0),
|
||||||
|
// new(1, 0),
|
||||||
|
// new(0, -1)
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// public static readonly ICollection<Vector2> PawnMoves = [new(0, 1)];
|
||||||
|
|
||||||
|
// public static readonly ICollection<Vector2> KnightMoves = [new(-1, 2), new(1, 2)];
|
||||||
|
|
||||||
|
// public static readonly ICollection<Vector2> BishopMoves =
|
||||||
|
// [
|
||||||
|
// new(float.NegativeInfinity, float.NegativeInfinity),
|
||||||
|
// new(float.NegativeInfinity, float.PositiveInfinity),
|
||||||
|
// new(float.PositiveInfinity, float.PositiveInfinity),
|
||||||
|
// new(float.PositiveInfinity, float.NegativeInfinity),
|
||||||
|
// ];
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class BoardRules
|
||||||
|
//{
|
||||||
|
// private readonly Dictionary<string, IPiece> pieces = [];
|
||||||
|
|
||||||
|
// public BoardRules WithSize(int width, int height)
|
||||||
|
// {
|
||||||
|
// this.BoardSize = new Size(width, height);
|
||||||
|
// return this;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public Size BoardSize { get; private set; }
|
||||||
|
|
||||||
|
// public BoardRules AddPiece(IPiece piece)
|
||||||
|
// {
|
||||||
|
// pieces.Add(piece.Name, piece);
|
||||||
|
// return this;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class BoardPieceRules(BoardRules rules, IPiece piece)
|
||||||
|
//{
|
||||||
|
// public IPiece Piece { get; } = piece;
|
||||||
|
// public BoardRules WithStartingPositions(ICollection<Vector2> positions)
|
||||||
|
// {
|
||||||
|
// // Validate positions against board size
|
||||||
|
// foreach (var pos in positions)
|
||||||
|
// {
|
||||||
|
// if (pos.X < 0 || pos.Y < 0 || pos.X >= rules.BoardSize.Width || pos.Y >= rules.BoardSize.Height)
|
||||||
|
// {
|
||||||
|
// throw new ArgumentOutOfRangeException(nameof(positions), $"Position {pos} is out of bounds for board size {rules.BoardSize}.");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // Assuming piece has a way to set starting positions, which it currently does not.
|
||||||
|
// // This is just a placeholder to show intent.
|
||||||
|
// // piece.SetStartingPositions(positions);
|
||||||
|
// return rules;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public interface IPiece
|
||||||
|
//{
|
||||||
|
// public string Name { get; }
|
||||||
|
// public ICollection<Vector2> MoveSet { get; }
|
||||||
|
// public ICollection<Vector2> PromotedMoveSet { get; }
|
||||||
|
|
||||||
|
// /// <summary>
|
||||||
|
// /// The starting positions for this type of piece on the board. There could be one or many.
|
||||||
|
// /// </summary>
|
||||||
|
// public ICollection<Vector2> StartingPositions { get; }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class GoldGeneral : IPiece
|
||||||
|
//{
|
||||||
|
// public string Name => nameof(GoldGeneral);
|
||||||
|
// public ICollection<Vector2> MoveSet => PieceMoves.GoldGeneralMoves;
|
||||||
|
// public ICollection<Vector2> PromotedMoveSet => PieceMoves.GoldGeneralMoves;
|
||||||
|
|
||||||
|
// public ICollection<Vector2> StartingPositions => [new(3, 0), new(5, 0), new(4, 1)];
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class Pawn : IPiece
|
||||||
|
//{
|
||||||
|
// public string Name => nameof(Pawn);
|
||||||
|
// public ICollection<Vector2> MoveSet => PieceMoves.PawnMoves;
|
||||||
|
// public ICollection<Vector2> PromotedMoveSet => PieceMoves.GoldGeneralMoves;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class Knight : IPiece
|
||||||
|
//{
|
||||||
|
// public string Name => nameof(Knight);
|
||||||
|
// public ICollection<Vector2> MoveSet => PieceMoves.KnightMoves;
|
||||||
|
// public ICollection<Vector2> PromotedMoveSet => PieceMoves.GoldGeneralMoves;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class Bishop : IPiece
|
||||||
|
//{
|
||||||
|
// public string Name => nameof(Bishop);
|
||||||
|
// public ICollection<Vector2> MoveSet => PieceMoves.BishopMoves;
|
||||||
|
// public ICollection<Vector2> PromotedMoveSet => PieceMoves.BishopMoves;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public class Luke
|
||||||
|
//{
|
||||||
|
// public void Yep()
|
||||||
|
// {
|
||||||
|
// var board = new BoardRules()
|
||||||
|
// .WithSize(9, 9)
|
||||||
|
// .AddPiece(new Pawn())
|
||||||
|
// }
|
||||||
|
//}
|
||||||
9
BoardRules/BoardRules.csproj
Normal file
9
BoardRules/BoardRules.csproj
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -32,3 +32,9 @@ public enum WhichPiece
|
|||||||
Pawn,
|
Pawn,
|
||||||
//PromotedPawn,
|
//PromotedPawn,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum WhichPlayer
|
||||||
|
{
|
||||||
|
Player1,
|
||||||
|
Player2
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
namespace Shogi.Domain.ValueObjects;
|
||||||
|
|
||||||
public static class Direction
|
public static class Direction
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
namespace Shogi.Domain.ValueObjects;
|
||||||
|
|
||||||
public enum Distance
|
public enum Distance
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
namespace Shogi.Domain.ValueObjects.Movement;
|
||||||
|
|
||||||
[DebuggerDisplay("{Step} - {Distance}")]
|
[DebuggerDisplay("{Step} - {Distance}")]
|
||||||
public record Path
|
public record Path
|
||||||
@@ -17,7 +17,7 @@ public record Path
|
|||||||
public Path(Vector2 step, Distance distance = Distance.OneStep)
|
public Path(Vector2 step, Distance distance = Distance.OneStep)
|
||||||
{
|
{
|
||||||
Step = step;
|
Step = step;
|
||||||
this.Distance = distance;
|
Distance = distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Path Invert() => new(Vector2.Negate(Step), Distance);
|
public Path Invert() => new(Vector2.Negate(Step), Distance);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects
|
namespace Shogi.Domain.ValueObjects
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects;
|
namespace Shogi.Domain.ValueObjects;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects;
|
namespace Shogi.Domain.ValueObjects;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects
|
namespace Shogi.Domain.ValueObjects
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects
|
namespace Shogi.Domain.ValueObjects
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects
|
namespace Shogi.Domain.ValueObjects
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects
|
namespace Shogi.Domain.ValueObjects
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects;
|
namespace Shogi.Domain.ValueObjects;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace Shogi.Domain.ValueObjects
|
namespace Shogi.Domain.ValueObjects
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
|
using Shogi.Domain.YetToBeAssimilatedIntoDDD;
|
||||||
namespace Shogi.Domain.ValueObjects;
|
namespace Shogi.Domain.ValueObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -247,7 +248,7 @@ public sealed class ShogiBoard(BoardState initialState)
|
|||||||
{
|
{
|
||||||
var list = new List<Vector2>(10);
|
var list = new List<Vector2>(10);
|
||||||
var position = path.Step + piecePosition;
|
var position = path.Step + piecePosition;
|
||||||
if (path.Distance == YetToBeAssimilatedIntoDDD.Pathing.Distance.MultiStep)
|
if (path.Distance == Distance.MultiStep)
|
||||||
{
|
{
|
||||||
|
|
||||||
while (position.IsInsideBoardBoundary())
|
while (position.IsInsideBoardBoundary())
|
||||||
@@ -340,7 +341,7 @@ public sealed class ShogiBoard(BoardState initialState)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var multiStepPaths = matchingPaths
|
var multiStepPaths = matchingPaths
|
||||||
.Where(path => path.Distance == YetToBeAssimilatedIntoDDD.Pathing.Distance.MultiStep)
|
.Where(path => path.Distance == Distance.MultiStep)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
if (multiStepPaths.Length == 0)
|
if (multiStepPaths.Length == 0)
|
||||||
{
|
{
|
||||||
@@ -371,7 +372,7 @@ public sealed class ShogiBoard(BoardState initialState)
|
|||||||
return new MoveResult(true);
|
return new MoveResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEnumerable<Vector2> GetPositionsAlongPath(Vector2 from, Vector2 to, YetToBeAssimilatedIntoDDD.Pathing.Path path)
|
private static IEnumerable<Vector2> GetPositionsAlongPath(Vector2 from, Vector2 to, Path path)
|
||||||
{
|
{
|
||||||
var next = from;
|
var next = from;
|
||||||
while (next != to && next.X >= 0 && next.X < 9 && next.Y >= 0 && next.Y < 9)
|
while (next != to && next.X >= 0 && next.X < 9 && next.Y >= 0 && next.Y < 9)
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
namespace Shogi.Domain.ValueObjects
|
|
||||||
{
|
|
||||||
public enum WhichPlayer
|
|
||||||
{
|
|
||||||
Player1,
|
|
||||||
Player2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
namespace Shogi.UI.Identity;
|
namespace Shogi.UI.Identity;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Components.Authorization;
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -235,6 +236,38 @@ public class CookieAuthenticationStateProvider : AuthenticationStateProvider, IA
|
|||||||
return _authenticated;
|
return _authenticated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ask for an email to be sent which contains a reset code. This reset code is used during <see cref="ChangePassword"/>
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Do not surface errors from this to users which may tell bad actors if emails do or do not exist in the system.</remarks>
|
||||||
|
public async Task<HttpResponseMessage> RequestPasswordReset(string email)
|
||||||
|
{
|
||||||
|
return await _httpClient.PostAsJsonAsync("forgotPassword", new { email });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<FormResult> ChangePassword(string email, string resetCode, string newPassword)
|
||||||
|
{
|
||||||
|
var body = new
|
||||||
|
{
|
||||||
|
email,
|
||||||
|
resetCode,
|
||||||
|
newPassword
|
||||||
|
};
|
||||||
|
var response = await _httpClient.PostAsJsonAsync("resetPassword", body);
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
return new FormResult { Succeeded = true };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new FormResult
|
||||||
|
{
|
||||||
|
Succeeded = false,
|
||||||
|
ErrorList = [await response.Content.ReadAsStringAsync()]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class RoleClaim
|
public class RoleClaim
|
||||||
{
|
{
|
||||||
public string? Issuer { get; set; }
|
public string? Issuer { get; set; }
|
||||||
|
|||||||
@@ -28,4 +28,6 @@ public interface IAccountManagement
|
|||||||
public Task<FormResult> RegisterAsync(string email, string password);
|
public Task<FormResult> RegisterAsync(string email, string password);
|
||||||
|
|
||||||
public Task<bool> CheckAuthenticatedAsync();
|
public Task<bool> CheckAuthenticatedAsync();
|
||||||
|
Task<HttpResponseMessage> RequestPasswordReset(string email);
|
||||||
|
Task<FormResult> ChangePassword(string email, string resetCode, string newPassword);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
.MainLayout {
|
.MainLayout {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-rows: 100vh;
|
|
||||||
place-items: stretch;
|
place-items: stretch;
|
||||||
}
|
gap: 5px;
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
.MainLayout {
|
|
||||||
grid-template-columns: min-content max-content;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,44 +1,77 @@
|
|||||||
@inject NavigationManager navigator
|
@inject NavigationManager navigator
|
||||||
@inject ShogiApi Api
|
@inject ShogiApi Api
|
||||||
|
|
||||||
<div class="NavMenu PrimaryTheme ThemeVariant--Contrast">
|
@* Desktop view *@
|
||||||
|
<nav class="NavMenu PrimaryTheme ThemeVariant--Contrast">
|
||||||
<h1>Shogi</h1>
|
<h1>Shogi</h1>
|
||||||
<p>
|
<a href="">Home</a>
|
||||||
<a href="">Home</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<a href="search">Search</a>
|
||||||
<a href="search">Search</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<AuthorizeView>
|
<AuthorizeView>
|
||||||
<p>
|
<button class="href" @onclick="CreateSession">Create</button>
|
||||||
<button class="href" @onclick="CreateSession">Create</button>
|
|
||||||
</p>
|
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
|
|
||||||
<div class="spacer" />
|
<div class="spacer" />
|
||||||
|
|
||||||
<AuthorizeView>
|
<AuthorizeView>
|
||||||
<Authorized>
|
<Authorized>
|
||||||
<p>@context.User.Identity?.Name</p>
|
<span>@context.User.Identity?.Name</span>
|
||||||
<p>
|
<a href="logout">Logout</a>
|
||||||
<a href="logout">Logout</a>
|
|
||||||
</p>
|
|
||||||
</Authorized>
|
</Authorized>
|
||||||
<NotAuthorized>
|
<NotAuthorized>
|
||||||
<p>
|
<a href="login">Login</a>
|
||||||
<a href="login">Login</a>
|
<a href="register">Register</a>
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a href="register">Register</a>
|
|
||||||
</p>
|
|
||||||
</NotAuthorized>
|
</NotAuthorized>
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
</div>
|
</nav>
|
||||||
|
|
||||||
|
@* Mobile view *@
|
||||||
|
<nav class="NavMenu PrimaryTheme ThemeVariant--Contrast compact">
|
||||||
|
<div class="flex">
|
||||||
|
<h1>Shogi</h1>
|
||||||
|
<AuthorizeView>
|
||||||
|
<span>@context.User.Identity?.Name</span>
|
||||||
|
</AuthorizeView>
|
||||||
|
<button class="href" @onclick="() => isExpanded = !isExpanded">
|
||||||
|
@(isExpanded ? "Collapse" : "Expand")
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drop-down @ExpandedCss">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="search">Search</a>
|
||||||
|
</li>
|
||||||
|
<AuthorizeView>
|
||||||
|
<Authorized>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<button class="href" @onclick="CreateSession">Create</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="logout">Logout</a>
|
||||||
|
</li>
|
||||||
|
</Authorized>
|
||||||
|
<NotAuthorized>
|
||||||
|
<li>
|
||||||
|
<a href="login">Login</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="register">Register</a>
|
||||||
|
</li>
|
||||||
|
</NotAuthorized>
|
||||||
|
</AuthorizeView>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private bool isExpanded = false;
|
||||||
|
|
||||||
async Task CreateSession()
|
async Task CreateSession()
|
||||||
{
|
{
|
||||||
@@ -49,4 +82,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string ExpandedCss => isExpanded ? "expand" : string.Empty;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,45 @@
|
|||||||
.NavMenu {
|
.NavMenu {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: baseline;
|
||||||
border-right: 2px solid #444;
|
gap: 0.75rem;
|
||||||
}
|
|
||||||
|
|
||||||
.NavMenu > * {
|
|
||||||
padding: 0 0.5rem;
|
padding: 0 0.5rem;
|
||||||
}
|
}
|
||||||
.NavMenu h1 {
|
|
||||||
}
|
|
||||||
|
|
||||||
.NavMenu .spacer {
|
.NavMenu .spacer {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************/
|
||||||
|
/* Mobile Nav Menu*/
|
||||||
|
/******************/
|
||||||
|
|
||||||
|
.NavMenu.compact {
|
||||||
|
/* display is changed in @media */
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.NavMenu.compact .flex {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.NavMenu.compact .drop-down {
|
||||||
|
height: 0;
|
||||||
|
overflow-y: clip;
|
||||||
|
transition: height 0.25s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
.NavMenu.compact .drop-down.expand {
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media all and (max-width: 750px) {
|
||||||
|
.NavMenu.compact {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.NavMenu {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool show = true;
|
|
||||||
private string activeSessionName = string.Empty;
|
private string activeSessionName = string.Empty;
|
||||||
private Task OnLoginChanged()
|
private Task OnLoginChanged()
|
||||||
{
|
{
|
||||||
@@ -46,10 +45,4 @@
|
|||||||
activeSessionName = s.SessionId.ToString();
|
activeSessionName = s.SessionId.ToString();
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnClickClose()
|
|
||||||
{
|
|
||||||
show = false;
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
125
Shogi.UI/Pages/Identity/ForgotPassword.razor
Normal file
125
Shogi.UI/Pages/Identity/ForgotPassword.razor
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
@page "/forgot"
|
||||||
|
@inject IAccountManagement Acct
|
||||||
|
|
||||||
|
<main class="PrimaryTheme">
|
||||||
|
<h1>Forgot Password</h1>
|
||||||
|
|
||||||
|
|
||||||
|
@if (isReset)
|
||||||
|
{
|
||||||
|
<p>Your password has been reset. Log in with your new password any time.</p>
|
||||||
|
} else if (isCodeSent)
|
||||||
|
{
|
||||||
|
<p>Look for an email from shogi@lucaserver.space with a reset code and fill out the form.</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
<section class="ForgotForm">
|
||||||
|
@if (errorList.Length > 0)
|
||||||
|
{
|
||||||
|
<ul class="Errors" style="grid-area: errors">
|
||||||
|
@foreach (var error in errorList)
|
||||||
|
{
|
||||||
|
<li>@error</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
|
|
||||||
|
<label>
|
||||||
|
Email
|
||||||
|
@if (!isCodeSent)
|
||||||
|
{
|
||||||
|
<input required name="email" type="email" @bind-value="email" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<span>@email</span>
|
||||||
|
}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
@if (!isCodeSent)
|
||||||
|
{
|
||||||
|
<button @onclick="SendResetCode">Send a reset code</button>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<label>
|
||||||
|
Reset code
|
||||||
|
<input required name="resetCode" type="text" @bind-value="code" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
New Password
|
||||||
|
<input required name="newPassword" type="password" @bind-value="newPassword" />
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Confirm Password
|
||||||
|
<input required name="confirmPassword" type="password" @bind-value="confirmPassword" />
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button @onclick="ChangePassword">Change my password</button>
|
||||||
|
}
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
private bool isCodeSent = false;
|
||||||
|
private bool isReset = false;
|
||||||
|
private string email = string.Empty;
|
||||||
|
private string code = string.Empty;
|
||||||
|
private string newPassword = string.Empty;
|
||||||
|
private string confirmPassword = string.Empty;
|
||||||
|
private string[] errorList = [];
|
||||||
|
|
||||||
|
async Task SendResetCode()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(email))
|
||||||
|
{
|
||||||
|
errorList = ["Email is required"];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var response = await Acct.RequestPasswordReset(email);
|
||||||
|
isCodeSent = response.IsSuccessStatusCode;
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
errorList = [await response.Content.ReadAsStringAsync()];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task ChangePassword()
|
||||||
|
{
|
||||||
|
var errors = new List<string>(5);
|
||||||
|
if (string.IsNullOrWhiteSpace(email))
|
||||||
|
{
|
||||||
|
errors.Add("Email is required");
|
||||||
|
}
|
||||||
|
if (string.IsNullOrWhiteSpace(code))
|
||||||
|
{
|
||||||
|
errors.Add("Reset code is required");
|
||||||
|
}
|
||||||
|
if (string.IsNullOrWhiteSpace(newPassword))
|
||||||
|
{
|
||||||
|
errors.Add("New password is required");
|
||||||
|
}
|
||||||
|
if (!newPassword.Equals(confirmPassword))
|
||||||
|
{
|
||||||
|
errors.Add("Your new password and confirm password do not match");
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = await Acct.ChangePassword(email, code, newPassword);
|
||||||
|
if (result.Succeeded)
|
||||||
|
{
|
||||||
|
isReset = true;
|
||||||
|
ClearFormFields();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorList = result.ErrorList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClearFormFields() {
|
||||||
|
email = code = newPassword = confirmPassword = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
25
Shogi.UI/Pages/Identity/ForgotPassword.razor.css
Normal file
25
Shogi.UI/Pages/Identity/ForgotPassword.razor.css
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
main {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ForgotForm {
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ForgotForm label {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ForgotForm button {
|
||||||
|
align-self: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ForgotForm .Errors {
|
||||||
|
color: darkred;
|
||||||
|
background-color: var(--foregroundColor)
|
||||||
|
}
|
||||||
@@ -27,6 +27,8 @@
|
|||||||
<label for="password" style="grid-area: passLabel">Password</label>
|
<label for="password" style="grid-area: passLabel">Password</label>
|
||||||
<input required id="password" name="passwordInput" type="password" style="grid-area: passControl" @bind-value="password" />
|
<input required id="password" name="passwordInput" type="password" style="grid-area: passControl" @bind-value="password" />
|
||||||
|
|
||||||
|
<a href="forgot" style="grid-area: resetLink; place-self: end;">Reset password</a>
|
||||||
|
|
||||||
<button style="grid-area: button" @onclick="DoLoginAsync">Login</button>
|
<button style="grid-area: button" @onclick="DoLoginAsync">Login</button>
|
||||||
</NotAuthorized>
|
</NotAuthorized>
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
|
|||||||
@@ -1,28 +1,20 @@
|
|||||||
main {
|
main {
|
||||||
/*display: grid;
|
padding: 1rem;
|
||||||
grid-template-areas:
|
|
||||||
"header header header"
|
|
||||||
". form ."
|
|
||||||
". . .";
|
|
||||||
grid-template-rows: auto 1fr 1fr;
|
|
||||||
|
|
||||||
place-items: center;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.LoginForm {
|
.LoginForm {
|
||||||
grid-area: form;
|
grid-area: form;
|
||||||
|
|
||||||
display: inline-grid;
|
display: inline-grid;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"errors errors"
|
"errors errors"
|
||||||
"emailLabel emailControl"
|
"emailLabel emailControl"
|
||||||
"passLabel passControl"
|
"passLabel passControl"
|
||||||
|
". resetLink"
|
||||||
"button button";
|
"button button";
|
||||||
gap: 0.5rem 3rem;
|
gap: 0.5rem 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.LoginForm .Errors {
|
.LoginForm .Errors {
|
||||||
color: darkred;
|
color: darkred;
|
||||||
}
|
background-color: var(--foregroundColor);
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<article class="game-board">
|
<article class="game-board">
|
||||||
<!-- Game board -->
|
<!-- Game board -->
|
||||||
<section class="board" data-perspective="@Perspective">
|
<section class="board" data-perspective="@Perspective" style="grid-area: board">
|
||||||
@for (var rank = 1; rank < 10; rank++)
|
@for (var rank = 1; rank < 10; rank++)
|
||||||
{
|
{
|
||||||
foreach (var file in Files)
|
foreach (var file in Files)
|
||||||
@@ -11,99 +11,121 @@
|
|||||||
var position = $"{file}{rank}";
|
var position = $"{file}{rank}";
|
||||||
var piece = Session?.BoardState.Board[position];
|
var piece = Session?.BoardState.Board[position];
|
||||||
var isSelected = piece != null && SelectedPosition == position;
|
var isSelected = piece != null && SelectedPosition == position;
|
||||||
<div class="tile" @onclick="OnClickTileInternal(position)"
|
<div class="tile"
|
||||||
|
@onclick="OnClickTileInternal(position)"
|
||||||
data-position="@(position)"
|
data-position="@(position)"
|
||||||
data-selected="@(isSelected)"
|
data-selected="@(isSelected)"
|
||||||
|
data-upsidedown="@(piece?.Owner != Perspective)"
|
||||||
style="grid-area: @position">
|
style="grid-area: @position">
|
||||||
@if (piece != null)
|
@if (piece != null)
|
||||||
{
|
{
|
||||||
<GamePiece Piece="piece" Perspective="Perspective" />
|
<GamePiece Piece="piece.WhichPiece" IsPromoted="piece.IsPromoted" />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<div class="ruler vertical" style="grid-area: rank">
|
|
||||||
<span>9</span>
|
|
||||||
<span>8</span>
|
|
||||||
<span>7</span>
|
|
||||||
<span>6</span>
|
|
||||||
<span>5</span>
|
|
||||||
<span>4</span>
|
|
||||||
<span>3</span>
|
|
||||||
<span>2</span>
|
|
||||||
<span>1</span>
|
|
||||||
</div>
|
|
||||||
<div class="ruler" style="grid-area: file">
|
|
||||||
<span>A</span>
|
|
||||||
<span>B</span>
|
|
||||||
<span>C</span>
|
|
||||||
<span>D</span>
|
|
||||||
<span>E</span>
|
|
||||||
<span>F</span>
|
|
||||||
<span>G</span>
|
|
||||||
<span>H</span>
|
|
||||||
<span>I</span>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
<div class="ruler vertical" style="grid-area: rank">
|
||||||
|
<span>9</span>
|
||||||
|
<span>8</span>
|
||||||
|
<span>7</span>
|
||||||
|
<span>6</span>
|
||||||
|
<span>5</span>
|
||||||
|
<span>4</span>
|
||||||
|
<span>3</span>
|
||||||
|
<span>2</span>
|
||||||
|
<span>1</span>
|
||||||
|
</div>
|
||||||
|
<div class="ruler" style="grid-area: file">
|
||||||
|
<span>A</span>
|
||||||
|
<span>B</span>
|
||||||
|
<span>C</span>
|
||||||
|
<span>D</span>
|
||||||
|
<span>E</span>
|
||||||
|
<span>F</span>
|
||||||
|
<span>G</span>
|
||||||
|
<span>H</span>
|
||||||
|
<span>I</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Side board -->
|
<!-- Side board -->
|
||||||
@if (Session != null && UseSideboard == true)
|
@if (Session != null && UseSideboard == true)
|
||||||
{
|
{
|
||||||
<aside class="side-board PrimaryTheme ThemeVariant--Contrast">
|
@* <aside class="side-board PrimaryTheme ThemeVariant--Contrast" style="grid-area: opponent-side-board"> *@
|
||||||
<div class="player-area">
|
@* @if (opponentHand.Any()) *@
|
||||||
<div class="hand">
|
@* { *@
|
||||||
@if (opponentHand.Any())
|
@* @foreach (var piece in opponentHand) *@
|
||||||
{
|
@* { *@
|
||||||
@foreach (var piece in opponentHand)
|
@* <div class="tile" *@
|
||||||
{
|
@* data-upsidedown="@(piece.Owner != Perspective)"> *@
|
||||||
<div class="tile">
|
@* <GamePiece Piece="piece.WhichPiece" IsPromoted="false" /> *@
|
||||||
<GamePiece Piece="piece" Perspective="Perspective" />
|
@* </div> *@
|
||||||
</div>
|
@* } *@
|
||||||
}
|
@* } *@
|
||||||
}
|
@* </aside> *@
|
||||||
</div>
|
|
||||||
<p class="text-center">Opponent's Hand</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="place-self-center">
|
<aside class="side-board PrimaryTheme ThemeVariant--Contrast" style="grid-area: opponent-side-board">
|
||||||
<PlayerName Name="@opponentName" IsTurn="!IsMyTurn" InCheck="IsOpponentInCheck" IsVictor="IsOpponentVictor" />
|
@if (OpponentHandGrouped.Any())
|
||||||
<hr />
|
{
|
||||||
<PlayerName Name="@userName" IsTurn="IsMyTurn" InCheck="IsPlayerInCheck" IsVictor="IsPlayerVictor" />
|
@foreach (var (whichPiece, count) in OpponentHandGrouped)
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="player-area">
|
|
||||||
@if (Perspective == WhichPlayer.Player2 && string.IsNullOrEmpty(Session.Player2))
|
|
||||||
{
|
{
|
||||||
<AuthorizeView>
|
<div class="tile"
|
||||||
|
data-upsidedown>
|
||||||
|
<GamePiece Piece="whichPiece" IsPromoted="false" Count="count"/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<div class="player-info" style="grid-area: opponent-info">
|
||||||
|
<OpponentName Name="@opponentName"
|
||||||
|
IsTurn="!IsMyTurn"
|
||||||
|
InCheck="IsOpponentInCheck"
|
||||||
|
IsVictor="IsOpponentVictor" />
|
||||||
|
</div>
|
||||||
|
<div class="player-info" style="grid-area: player-info">
|
||||||
|
<PlayerName Name="@userName"
|
||||||
|
IsTurn="IsMyTurn"
|
||||||
|
InCheck="IsPlayerInCheck"
|
||||||
|
IsVictor="IsPlayerVictor" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<AuthorizeView>
|
||||||
|
<Authorized>
|
||||||
|
<aside class="side-board PrimaryTheme ThemeVariant--Contrast" style="grid-area: player-side-board">
|
||||||
|
@if (Perspective == WhichPlayer.Player2 && string.IsNullOrEmpty(Session.Player2))
|
||||||
|
{
|
||||||
<div class="place-self-center">
|
<div class="place-self-center">
|
||||||
<button @onclick="OnClickJoinGameInternal">Join Game</button>
|
<button @onclick="OnClickJoinGameInternal">Join Game</button>
|
||||||
</div>
|
</div>
|
||||||
</AuthorizeView>
|
}
|
||||||
}
|
else if (userHand.Any())
|
||||||
else
|
{
|
||||||
{
|
@foreach (var piece in userHand)
|
||||||
<p class="text-center">Your Hand</p>
|
|
||||||
<div class="hand">
|
|
||||||
@if (userHand.Any())
|
|
||||||
{
|
{
|
||||||
@foreach (var piece in userHand)
|
<div @onclick="OnClickHandInternal(piece)"
|
||||||
{
|
class="tile"
|
||||||
<div @onclick="OnClickHandInternal(piece)"
|
data-selected="@(piece.WhichPiece == SelectedPieceFromHand)">
|
||||||
class="tile"
|
<GamePiece Piece="piece.WhichPiece" IsPromoted="false" />
|
||||||
data-selected="@(piece.WhichPiece == SelectedPieceFromHand)">
|
</div>
|
||||||
<GamePiece Piece="piece" Perspective="Perspective" />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</div>
|
}
|
||||||
}
|
</aside>
|
||||||
</div>
|
</Authorized>
|
||||||
|
<NotAuthorized>
|
||||||
</aside>
|
<aside class="login-to-play PrimaryTheme ThemeVariant--Contrast" style="grid-area: player-side-board">
|
||||||
|
@if (Perspective == WhichPlayer.Player2 && string.IsNullOrEmpty(Session.Player2))
|
||||||
|
{
|
||||||
|
<p><a href="login">Log in</a> to play!</p>
|
||||||
|
}
|
||||||
|
</aside>
|
||||||
|
</NotAuthorized>
|
||||||
|
</AuthorizeView>
|
||||||
}
|
}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
static readonly string[] Files = new[] { "A", "B", "C", "D", "E", "F", "G", "H", "I" };
|
static readonly string[] Files = new[] { "A", "B", "C", "D", "E", "F", "G", "H", "I" };
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -119,12 +141,10 @@
|
|||||||
[Parameter] public EventCallback<Piece> OnClickHand { get; set; }
|
[Parameter] public EventCallback<Piece> OnClickHand { get; set; }
|
||||||
[Parameter] public EventCallback OnClickJoinGame { get; set; }
|
[Parameter] public EventCallback OnClickJoinGame { get; set; }
|
||||||
[Parameter] public bool UseSideboard { get; set; } = true;
|
[Parameter] public bool UseSideboard { get; set; } = true;
|
||||||
|
|
||||||
private IReadOnlyCollection<Piece> opponentHand;
|
private IReadOnlyCollection<Piece> opponentHand;
|
||||||
private IReadOnlyCollection<Piece> userHand;
|
private IReadOnlyCollection<Piece> userHand;
|
||||||
private string? userName;
|
private string? userName;
|
||||||
private string? opponentName;
|
private string? opponentName;
|
||||||
|
|
||||||
public GameBoardPresentation()
|
public GameBoardPresentation()
|
||||||
{
|
{
|
||||||
opponentHand = Array.Empty<Piece>();
|
opponentHand = Array.Empty<Piece>();
|
||||||
@@ -136,6 +156,7 @@
|
|||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
base.OnParametersSet();
|
base.OnParametersSet();
|
||||||
|
|
||||||
if (Session == null)
|
if (Session == null)
|
||||||
{
|
{
|
||||||
opponentHand = Array.Empty<Piece>();
|
opponentHand = Array.Empty<Piece>();
|
||||||
@@ -160,15 +181,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private Dictionary<WhichPiece, int> OpponentHandGrouped => opponentHand.GroupBy(piece => piece.WhichPiece).ToDictionary(grouping => grouping.Key, grouping => grouping.Count());
|
||||||
|
private Dictionary<WhichPiece, int> PlayerHandGrouped => userHand.GroupBy(piece => piece.WhichPiece).ToDictionary(grouping => grouping.Key, grouping => grouping.Count());
|
||||||
|
|
||||||
private bool IsMyTurn => Session?.BoardState.WhoseTurn == Perspective;
|
private bool IsMyTurn => Session?.BoardState.WhoseTurn == Perspective;
|
||||||
|
|
||||||
private bool IsPlayerInCheck => Session?.BoardState.PlayerInCheck == Perspective;
|
private bool IsPlayerInCheck => Session?.BoardState.PlayerInCheck == Perspective;
|
||||||
|
|
||||||
private bool IsOpponentInCheck => Session?.BoardState.PlayerInCheck != null && Session.BoardState.PlayerInCheck != Perspective;
|
private bool IsOpponentInCheck => Session?.BoardState.PlayerInCheck != null && Session.BoardState.PlayerInCheck != Perspective;
|
||||||
|
|
||||||
private bool IsPlayerVictor => Session?.BoardState.Victor == Perspective;
|
private bool IsPlayerVictor => Session?.BoardState.Victor == Perspective;
|
||||||
|
|
||||||
|
|
||||||
private bool IsOpponentVictor => Session?.BoardState.Victor != null && Session.BoardState.Victor != Perspective;
|
private bool IsOpponentVictor => Session?.BoardState.Victor != null && Session.BoardState.Victor != Perspective;
|
||||||
|
|
||||||
private Func<Task> OnClickTileInternal(string position) => () =>
|
private Func<Task> OnClickTileInternal(string position) => () =>
|
||||||
|
|||||||
@@ -1,50 +1,57 @@
|
|||||||
.game-board {
|
.game-board {
|
||||||
--ratio: 0.9;
|
--ratio: 0.9;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: min-content repeat(9, minmax(2rem, 4rem)) max-content;
|
grid-template-areas:
|
||||||
grid-template-rows: repeat(9, 1fr) auto;
|
"rank board opponent-side-board"
|
||||||
|
"rank board opponent-info"
|
||||||
|
"rank board player-info"
|
||||||
|
"rank board player-side-board"
|
||||||
|
". file .";
|
||||||
|
grid-template-columns: auto 1fr auto;
|
||||||
|
grid-template-rows: 3fr 1fr 1fr 3fr auto;
|
||||||
background-color: #444;
|
background-color: #444;
|
||||||
gap: 3px;
|
gap: 5px;
|
||||||
place-self: center;
|
place-self: center;
|
||||||
|
color: beige;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.game-board [data-upsidedown] {
|
||||||
|
transform: rotateZ(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
.board {
|
.board {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-column: span 10;
|
|
||||||
grid-row: span 10;
|
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"rank A9 B9 C9 D9 E9 F9 G9 H9 I9"
|
"A9 B9 C9 D9 E9 F9 G9 H9 I9"
|
||||||
"rank A8 B8 C8 D8 E8 F8 G8 H8 I8"
|
"A8 B8 C8 D8 E8 F8 G8 H8 I8"
|
||||||
"rank A7 B7 C7 D7 E7 F7 G7 H7 I7"
|
"A7 B7 C7 D7 E7 F7 G7 H7 I7"
|
||||||
"rank A6 B6 C6 D6 E6 F6 G6 H6 I6"
|
"A6 B6 C6 D6 E6 F6 G6 H6 I6"
|
||||||
"rank A5 B5 C5 D5 E5 F5 G5 H5 I5"
|
"A5 B5 C5 D5 E5 F5 G5 H5 I5"
|
||||||
"rank A4 B4 C4 D4 E4 F4 G4 H4 I4"
|
"A4 B4 C4 D4 E4 F4 G4 H4 I4"
|
||||||
"rank A3 B3 C3 D3 E3 F3 G3 H3 I3"
|
"A3 B3 C3 D3 E3 F3 G3 H3 I3"
|
||||||
"rank A2 B2 C2 D2 E2 F2 G2 H2 I2"
|
"A2 B2 C2 D2 E2 F2 G2 H2 I2"
|
||||||
"rank A1 B1 C1 D1 E1 F1 G1 H1 I1"
|
"A1 B1 C1 D1 E1 F1 G1 H1 I1";
|
||||||
". file file file file file file file file file";
|
grid-template-columns: repeat(9, 1fr);
|
||||||
grid-template-columns: subgrid;
|
grid-template-rows: repeat(9, 1fr);
|
||||||
grid-template-rows: subgrid;
|
|
||||||
background-color: #444444;
|
background-color: #444444;
|
||||||
max-height: 100%;
|
gap: 3px;
|
||||||
|
max-height: 80vmin;
|
||||||
aspect-ratio: var(--ratio);
|
aspect-ratio: var(--ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
.board[data-perspective="Player2"] {
|
.board[data-perspective="Player2"] {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"rank I1 H1 G1 F1 E1 D1 C1 B1 A1"
|
"I1 H1 G1 F1 E1 D1 C1 B1 A1"
|
||||||
"rank I2 H2 G2 F2 E2 D2 C2 B2 A2"
|
"I2 H2 G2 F2 E2 D2 C2 B2 A2"
|
||||||
"rank I3 H3 G3 F3 E3 D3 C3 B3 A3"
|
"I3 H3 G3 F3 E3 D3 C3 B3 A3"
|
||||||
"rank I4 H4 G4 F4 E4 D4 C4 B4 A4"
|
"I4 H4 G4 F4 E4 D4 C4 B4 A4"
|
||||||
"rank I5 H5 G5 F5 E5 D5 C5 B5 A5"
|
"I5 H5 G5 F5 E5 D5 C5 B5 A5"
|
||||||
"rank I6 H6 G6 F6 E6 D6 C6 B6 A6"
|
"I6 H6 G6 F6 E6 D6 C6 B6 A6"
|
||||||
"rank I7 H7 G7 F7 E7 D7 C7 B7 A7"
|
"I7 H7 G7 F7 E7 D7 C7 B7 A7"
|
||||||
"rank I8 H8 G8 F8 E8 D8 C8 B8 A8"
|
"I8 H8 G8 F8 E8 D8 C8 B8 A8"
|
||||||
"rank I9 H9 G9 F9 E9 D9 C9 B9 A9"
|
"I9 H9 G9 F9 E9 D9 C9 B9 A9";
|
||||||
". file file file file file file file file file";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.tile {
|
.tile {
|
||||||
display: grid;
|
display: grid;
|
||||||
place-content: center;
|
place-content: center;
|
||||||
@@ -77,37 +84,58 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.side-board {
|
.side-board {
|
||||||
grid-row: span 9;
|
display: grid;
|
||||||
display: flex;
|
grid-template-columns: repeat(auto-fill, 3rem);
|
||||||
flex-direction: column;
|
place-items: end start;
|
||||||
place-content: space-between;
|
gap: 5px;
|
||||||
padding: 1rem;
|
padding: 0.25rem;
|
||||||
|
background: linear-gradient(45deg, beige, white);
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-board .player-area {
|
.side-board.opponent {
|
||||||
display: grid;
|
place-items: start;
|
||||||
place-items: stretch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-board .hand {
|
.side-board:empty {
|
||||||
display: grid;
|
content: 'Captured Pieces';
|
||||||
border: 1px solid #ccc;
|
|
||||||
grid-template-columns: repeat(auto-fill, 3rem);
|
|
||||||
grid-template-rows: 3rem;
|
|
||||||
place-items: center start;
|
|
||||||
padding: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.player-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-content: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 1000px) {
|
.login-to-play {
|
||||||
|
background: linear-gradient(45deg, beige, white);
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
min-height: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 750px) {
|
||||||
.game-board {
|
.game-board {
|
||||||
grid-template-columns: min-content repeat(9, minmax(2rem, 4rem));
|
grid-template-areas:
|
||||||
grid-template-rows: repeat(9, 1fr) auto max-content;
|
". opponent-side-board"
|
||||||
|
". opponent-info"
|
||||||
|
"rank board"
|
||||||
|
". file"
|
||||||
|
". player-info"
|
||||||
|
". player-side-board";
|
||||||
|
grid-template-rows: repeat(2, auto) 1fr repeat(3, auto);
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.board {
|
||||||
|
min-height: 95vmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-board {
|
.side-board {
|
||||||
grid-row: unset;
|
min-height: 2rem;
|
||||||
grid-column: span 10;
|
}
|
||||||
flex-direction: row;
|
|
||||||
|
.player-info {
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
38
Shogi.UI/Pages/Play/GameBoard/OpponentName.razor
Normal file
38
Shogi.UI/Pages/Play/GameBoard/OpponentName.razor
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
@using Shogi.Contracts.Types
|
||||||
|
<div style="margin: 0" class="PrimaryTheme">
|
||||||
|
|
||||||
|
@if (IsTurn)
|
||||||
|
{
|
||||||
|
<span class="turn-marker" title="Shows which player is next to move a piece.">Turn</span>
|
||||||
|
<span> </span>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (InCheck)
|
||||||
|
{
|
||||||
|
<span class="check-marker" title="King is in danger!">Check</span>
|
||||||
|
<span> </span>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (IsVictor)
|
||||||
|
{
|
||||||
|
<span class="victory-marker" title="Victory!">Victor</span>
|
||||||
|
<span> </span>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (string.IsNullOrEmpty(Name))
|
||||||
|
{
|
||||||
|
<p>Empty Seat</p>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<p>@Name</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter][EditorRequired] public bool IsTurn { get; set; }
|
||||||
|
[Parameter][EditorRequired] public bool InCheck { get; set; }
|
||||||
|
[Parameter][EditorRequired] public bool IsVictor { get; set; }
|
||||||
|
[Parameter][EditorRequired] public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
28
Shogi.UI/Pages/Play/GameBoard/OpponentName.razor.css
Normal file
28
Shogi.UI/Pages/Play/GameBoard/OpponentName.razor.css
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
.turn-marker {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 5px;
|
||||||
|
background-color: var(--foregroundColor);
|
||||||
|
background-color: var(--middlegroundColor);
|
||||||
|
color: var(--backgroundColor);
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80%;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-marker {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 3px 8px;
|
||||||
|
background-color: darkred;
|
||||||
|
color: beige;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.victory-marker {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 3px 8px;
|
||||||
|
background-color: darkgreen;
|
||||||
|
color: beige;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
@@ -1,4 +1,15 @@
|
|||||||
<p style="margin: 0">
|
@using Shogi.Contracts.Types
|
||||||
|
<div style="margin: 0" class="PrimaryTheme PlayerName">
|
||||||
|
|
||||||
|
@if (string.IsNullOrEmpty(Name))
|
||||||
|
{
|
||||||
|
<p>Empty Seat</p>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<p>@Name</p>
|
||||||
|
}
|
||||||
|
|
||||||
@if (IsTurn)
|
@if (IsTurn)
|
||||||
{
|
{
|
||||||
<span class="turn-marker" title="Shows which player is next to move a piece.">Turn</span>
|
<span class="turn-marker" title="Shows which player is next to move a piece.">Turn</span>
|
||||||
@@ -16,17 +27,7 @@
|
|||||||
<span class="victory-marker" title="Victory!">Victor</span>
|
<span class="victory-marker" title="Victory!">Victor</span>
|
||||||
<span> </span>
|
<span> </span>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
@if (string.IsNullOrEmpty(Name))
|
|
||||||
{
|
|
||||||
<span>Empty Seat</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<span>@Name</span>
|
|
||||||
}
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter][EditorRequired] public bool IsTurn { get; set; }
|
[Parameter][EditorRequired] public bool IsTurn { get; set; }
|
||||||
|
|||||||
@@ -1,26 +1,30 @@
|
|||||||
.turn-marker {
|
.turn-marker {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px 8px;
|
padding: 2px 5px;
|
||||||
background-color: #444;
|
background-color: var(--foregroundColor);
|
||||||
color: beige;
|
background-color: var(--middlegroundColor);
|
||||||
|
color: var(--backgroundColor);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.check-marker {
|
.check-marker {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px 8px;
|
padding: 2px 5px;
|
||||||
background-color: darkred;
|
background-color: #f3a1a1;
|
||||||
color: beige;
|
color: darkred;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.victory-marker {
|
.victory-marker {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px 8px;
|
padding: 2px 5px;
|
||||||
background-color: darkgreen;
|
background-color: darkgreen;
|
||||||
color: beige;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@using Shogi.Contracts.Types
|
@using Shogi.Contracts.Types
|
||||||
|
|
||||||
<div class="game-piece" title="@HtmlTitle" data-upsidedown="@(Piece?.Owner != Perspective)" data-owner="@Piece?.Owner.ToString()">
|
<div class="game-piece" title="@HtmlTitle">
|
||||||
@switch (Piece?.WhichPiece)
|
@switch (Piece)
|
||||||
{
|
{
|
||||||
case WhichPiece.Bishop:
|
case WhichPiece.Bishop:
|
||||||
<Bishop IsPromoted="@IsPromoted" />
|
<Bishop IsPromoted="@IsPromoted" />
|
||||||
@@ -31,18 +31,18 @@
|
|||||||
@*render nothing*@
|
@*render nothing*@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@if (Count > 0)
|
||||||
|
{
|
||||||
|
<span class="counter">@Count</span>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter] public WhichPiece? Piece { get; set; }
|
||||||
public Contracts.Types.Piece? Piece { get; set; }
|
[Parameter] public bool IsPromoted { get; set; }
|
||||||
|
[Parameter] public int Count { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
private string HtmlTitle => Piece switch
|
||||||
public WhichPlayer Perspective { get; set; }
|
|
||||||
|
|
||||||
private bool IsPromoted => Piece != null && Piece.IsPromoted;
|
|
||||||
|
|
||||||
private string HtmlTitle => Piece?.WhichPiece switch
|
|
||||||
{
|
{
|
||||||
WhichPiece.Bishop => "Bishop",
|
WhichPiece.Bishop => "Bishop",
|
||||||
WhichPiece.GoldGeneral => "Gold General",
|
WhichPiece.GoldGeneral => "Gold General",
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
::deep svg {
|
::deep svg {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
height: auto;
|
||||||
}
|
|
||||||
|
|
||||||
[data-upsidedown] {
|
|
||||||
transform: rotateZ(180deg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-piece {
|
.game-piece {
|
||||||
overflow: hidden; /* Because SVGs have weird sizes. */
|
overflow: hidden; /* Because SVGs have weird sizes. */
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.game-piece .counter {
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
padding: 2px;
|
||||||
|
z-index: 100;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 9px;
|
||||||
|
border: 1px solid #444;
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@if (IsPromoted)
|
@if (IsPromoted)
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="ryuuma.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="ryuuma.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>龍馬</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>ryuuma</rdf:li><rdf:li>ryuume</rdf:li><rdf:li>ryuma</rdf:li><rdf:li>ryume</rdf:li><rdf:li>龍馬</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>龍馬</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>ryuuma</rdf:li><rdf:li>ryuume</rdf:li><rdf:li>ryuma</rdf:li><rdf:li>ryume</rdf:li><rdf:li>龍馬</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="35" inkscape:window-y="763" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="35" inkscape:window-y="763" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="kakugyou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="kakugyou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>角行</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>kakugyou</rdf:li><rdf:li>kakugyo</rdf:li><rdf:li>角行</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>角行</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>kakugyou</rdf:li><rdf:li>kakugyo</rdf:li><rdf:li>角行</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="25" inkscape:window-y="368" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="25" inkscape:window-y="368" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"> <linearGradient id="linearGradient10936"> <stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /> <stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /> </linearGradient> <linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /> </defs>
|
<defs id="defs2168"> <linearGradient id="linearGradient10936"> <stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /> <stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /> </linearGradient> <linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /> </defs>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="gyokushou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="gyokushou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>玉將</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>gyokushou</rdf:li><rdf:li>gyokusho</rdf:li><rdf:li>玉将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>玉將</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>gyokushou</rdf:li><rdf:li>gyokusho</rdf:li><rdf:li>玉将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="121" inkscape:window-y="181" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="121" inkscape:window-y="181" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="kinshou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="kinshou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>金將</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>kinshou</rdf:li><rdf:li>kinsho</rdf:li><rdf:li>金将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>金將</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>kinshou</rdf:li><rdf:li>kinsho</rdf:li><rdf:li>金将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="10" inkscape:window-y="641" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="10" inkscape:window-y="641" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient2173" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.9299803,0,0,0.9377921,6.7492264,12.988526)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient2173" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.9299803,0,0,0.9377921,6.7492264,12.988526)" /></defs>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,6 +1,6 @@
|
|||||||
@if (IsPromoted)
|
@if (IsPromoted)
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="narikei.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="narikei.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>成桂</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>narikei</rdf:li><rdf:li>成桂</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>成桂</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>narikei</rdf:li><rdf:li>成桂</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="6" inkscape:window-y="772" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="6" inkscape:window-y="772" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,-6.1065495e-2)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,-6.1065495e-2)" /></defs>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="keima.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="keima.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>桂馬</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>keima</rdf:li><rdf:li>桂馬</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>桂馬</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>keima</rdf:li><rdf:li>桂馬</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="8" inkscape:window-y="757" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="8" inkscape:window-y="757" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,-6.1065495e-2)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,-6.1065495e-2)" /></defs>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@if (IsPromoted)
|
@if (IsPromoted)
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="narikyou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="narikyou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>成香</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>narikyou</rdf:li><rdf:li>narikyo</rdf:li><rdf:li>成香</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>成香</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>narikyou</rdf:li><rdf:li>narikyo</rdf:li><rdf:li>成香</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="32" inkscape:window-y="819" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="32" inkscape:window-y="819" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="kyousha.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="kyousha.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>香車</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>kyousha</rdf:li><rdf:li>kyosha</rdf:li><rdf:li>香車</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>香車</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>kyousha</rdf:li><rdf:li>kyosha</rdf:li><rdf:li>香車</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="23" inkscape:window-y="738" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="23" inkscape:window-y="738" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@if (IsPromoted)
|
@if (IsPromoted)
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="tokin.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="tokin.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>と金</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>tokin</rdf:li><rdf:li>と金</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>と金</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>tokin</rdf:li><rdf:li>と金</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="16" inkscape:window-y="776" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="16" inkscape:window-y="776" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="fuhyou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="fuhyou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>歩兵</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>jp</dc:language><dc:subject><rdf:Bag><rdf:li>fuhyou</rdf:li><rdf:li>fuhyo</rdf:li><rdf:li>歩兵</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>歩兵</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>jp</dc:language><dc:subject><rdf:Bag><rdf:li>fuhyou</rdf:li><rdf:li>fuhyo</rdf:li><rdf:li>歩兵</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="46" inkscape:window-y="46" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="46" inkscape:window-y="46" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="oushou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="oushou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>王將</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>oushou</rdf:li><rdf:li>osho</rdf:li><rdf:li>王将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>王將</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>oushou</rdf:li><rdf:li>osho</rdf:li><rdf:li>王将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="38" inkscape:window-y="748" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="38" inkscape:window-y="748" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,6 +1,6 @@
|
|||||||
@if (IsPromoted)
|
@if (IsPromoted)
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="ryuuou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="ryuuou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>龍王</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>ryuuou</rdf:li><rdf:li>ryuo</rdf:li><rdf:li>龍王</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>龍王</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>ryuuou</rdf:li><rdf:li>ryuo</rdf:li><rdf:li>龍王</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="11" inkscape:window-y="743" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="11" inkscape:window-y="743" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="hisha.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="hisha.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>飛車</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>hisha</rdf:li><rdf:li>飛車</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>飛車</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>hisha</rdf:li><rdf:li>飛車</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="15" inkscape:window-y="407" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="15" inkscape:window-y="407" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient2173" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.96514,0,0,0.9687658,4.9614803,8.8564779)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient2173" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.96514,0,0,0.9687658,4.9614803,8.8564779)" /></defs>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@if (IsPromoted)
|
@if (IsPromoted)
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="narigin.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="narigin.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>成銀</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>narigin</rdf:li><rdf:li>成銀</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata14"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>成銀</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>narigin</rdf:li><rdf:li>成銀</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="1" inkscape:window-y="745" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="1" inkscape:window-y="745" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<svg viewbox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="ginshou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
<svg viewBox="0 0 108.07086 124.01575" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="108.07086" height="124.01575" id="svg2166" sodipodi:version="0.32" inkscape:version="0.45" sodipodi:docname="ginshou.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="C:\Develop\Shogi\Shogi\gfx\default" sodipodi:modified="true">
|
||||||
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /><dc:title>銀将</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>ginshou</rdf:li><rdf:li>ginsho</rdf:li><rdf:li>銀将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
<metadata id="metadata15"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /><dc:title>銀将</dc:title><dc:date>2007-07-22</dc:date><dc:creator><cc:Agent><dc:title>13xforever</dc:title></cc:Agent></dc:creator><dc:language>ja</dc:language><dc:subject><rdf:Bag><rdf:li>ginshou</rdf:li><rdf:li>ginsho</rdf:li><rdf:li>銀将</rdf:li><rdf:li>shougi</rdf:li><rdf:li>shogi</rdf:li><rdf:li>将棋</rdf:li></rdf:Bag></dc:subject><dc:coverage>board game</dc:coverage></cc:Work><cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"><cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits rdf:resource="http://web.resource.org/cc/Distribution" /><cc:requires rdf:resource="http://web.resource.org/cc/Notice" /><cc:requires rdf:resource="http://web.resource.org/cc/Attribution" /><cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /><cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" /></cc:License></rdf:RDF></metadata>
|
||||||
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="2" inkscape:window-y="400" inkscape:current-layer="svg2166" />
|
<sodipodi:namedview inkscape:window-height="575" inkscape:window-width="765" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="3.0399365" inkscape:cx="54.035431" inkscape:cy="62.007874" inkscape:window-x="2" inkscape:window-y="400" inkscape:current-layer="svg2166" />
|
||||||
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
<defs id="defs2168"><linearGradient id="linearGradient10936"><stop style="stop-color:#fcf3e8;stop-opacity:1" offset="0" id="stop10938" /><stop style="stop-color:#ba6100;stop-opacity:1" offset="1" id="stop10940" /></linearGradient><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient10942" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /><linearGradient x1="17.523264" y1="5.9785309" x2="101.69292" y2="113.38583" id="linearGradient12957" xlink:href="#linearGradient10936" gradientUnits="userSpaceOnUse" gradientTransform="translate(3.1889734,0)" /></defs>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
<main class="PrimaryTheme">
|
<main class="PrimaryTheme" style="padding: 1rem;">
|
||||||
<GameBoard SessionId="@SessionId" />
|
<GameBoard SessionId="@SessionId" />
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|||||||
using Microsoft.AspNetCore.ResponseCompression;
|
using Microsoft.AspNetCore.ResponseCompression;
|
||||||
using Shogi.UI;
|
using Shogi.UI;
|
||||||
using Shogi.UI.Identity;
|
using Shogi.UI.Identity;
|
||||||
using Shogi.UI.Pages.Play;
|
|
||||||
using Shogi.UI.Shared;
|
using Shogi.UI.Shared;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
@@ -27,7 +26,7 @@ static void ConfigureDependencies(IServiceCollection services, IConfiguration co
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Why two HTTP clients?
|
* Why two HTTP clients?
|
||||||
* See qhttps://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/additional-scenarios?source=recommendations&view=aspnetcore-6.0#unauthenticated-or-unauthorized-web-api-requests-in-an-app-with-a-secure-default-client
|
* See https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/additional-scenarios?source=recommendations&view=aspnetcore-6.0#unauthenticated-or-unauthorized-web-api-requests-in-an-app-with-a-secure-default-client
|
||||||
*/
|
*/
|
||||||
var baseUrl = configuration["ShogiApiUrl"];
|
var baseUrl = configuration["ShogiApiUrl"];
|
||||||
if (string.IsNullOrWhiteSpace(baseUrl))
|
if (string.IsNullOrWhiteSpace(baseUrl))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
div {
|
div {
|
||||||
display: grid;
|
display: grid;
|
||||||
place-content: stretch;
|
place-content: stretch;
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Pages\Home\VisualAids\PromotedPieceVisualAid.razor.css" />
|
<None Remove="Pages\Home\VisualAids\PromotedPieceVisualAid.razor.css" />
|
||||||
|
<None Remove="Pages\Play\GameBoard\OpponentName.razor.css" />
|
||||||
<None Remove="Pages\Play\GameBoard\PlayerName.razor.css" />
|
<None Remove="Pages\Play\GameBoard\PlayerName.razor.css" />
|
||||||
<None Remove="Pages\Play\GameBrowserEntry.razor.css" />
|
<None Remove="Pages\Play\GameBrowserEntry.razor.css" />
|
||||||
<None Remove="Pages\SearchPage.razor.css" />
|
<None Remove="Pages\SearchPage.razor.css" />
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Pages\Home\VisualAids\PromotedPieceVisualAid.razor.css" />
|
<Content Include="Pages\Home\VisualAids\PromotedPieceVisualAid.razor.css" />
|
||||||
|
<Content Include="Pages\Play\GameBoard\OpponentName.razor.css" />
|
||||||
<Content Include="Pages\Play\GameBoard\PlayerName.razor.css" />
|
<Content Include="Pages\Play\GameBoard\PlayerName.razor.css" />
|
||||||
<Content Include="Pages\Play\GameBrowserEntry.razor.css" />
|
<Content Include="Pages\Play\GameBrowserEntry.razor.css" />
|
||||||
<Content Include="Pages\SearchPage.razor.css" />
|
<Content Include="Pages\SearchPage.razor.css" />
|
||||||
@@ -35,7 +37,6 @@
|
|||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client.Core" Version="8.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client.Core" Version="8.0.10" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="8.0.10" />
|
||||||
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="8.0.10" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
html, body, #app {
|
html, body, #app {
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
color: var(--hrefColor);
|
color: var(--hrefColor);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.PrimaryTheme button.href:hover {
|
.PrimaryTheme button.href:hover {
|
||||||
@@ -55,13 +56,17 @@
|
|||||||
margin-bottom: var(--uniformBottomMargin);
|
margin-bottom: var(--uniformBottomMargin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.PrimaryTheme p:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.PrimaryTheme ul {
|
.PrimaryTheme ul {
|
||||||
padding: 0.3rem;
|
padding: 0.3rem;
|
||||||
margin: 0;
|
margin: 0 !important;
|
||||||
margin-bottom: var(--uniformBottomMargin);
|
margin-bottom: var(--uniformBottomMargin);
|
||||||
background-color: var(--foregroundColor);
|
background-color: var(--backgroundColor);
|
||||||
color: var(--backgroundColor);
|
color: var(--foregroundColor);
|
||||||
list-style-position: inside;
|
list-style: inside square;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<title>Shogi.UI</title>
|
<title>Shogi.UI</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var base = document.createElement('base');
|
const base = document.createElement('base');
|
||||||
base.href = window.location.href.includes("localhost")
|
base.href = window.location.href.includes("localhost")
|
||||||
? "/"
|
? "/"
|
||||||
: "/shogi/";
|
: "/shogi/";
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shogi.Api", "Shogi.Api\Shog
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "E2ETests", "Tests\E2ETests\E2ETests.csproj", "{401120C3-45D6-4A23-8D87-C2BED29F4950}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "E2ETests", "Tests\E2ETests\E2ETests.csproj", "{401120C3-45D6-4A23-8D87-C2BED29F4950}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BoardRules", "BoardRules\BoardRules.csproj", "{5B2F47A0-6AD5-4DA9-9CFE-9F52F634DD5E}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -67,6 +69,10 @@ Global
|
|||||||
{401120C3-45D6-4A23-8D87-C2BED29F4950}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{401120C3-45D6-4A23-8D87-C2BED29F4950}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{401120C3-45D6-4A23-8D87-C2BED29F4950}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{401120C3-45D6-4A23-8D87-C2BED29F4950}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{401120C3-45D6-4A23-8D87-C2BED29F4950}.Release|Any CPU.Build.0 = Release|Any CPU
|
{401120C3-45D6-4A23-8D87-C2BED29F4950}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5B2F47A0-6AD5-4DA9-9CFE-9F52F634DD5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5B2F47A0-6AD5-4DA9-9CFE-9F52F634DD5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5B2F47A0-6AD5-4DA9-9CFE-9F52F634DD5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5B2F47A0-6AD5-4DA9-9CFE-9F52F634DD5E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -1,26 +1,25 @@
|
|||||||
using System.Numerics;
|
using Shogi.Domain.YetToBeAssimilatedIntoDDD;
|
||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace UnitTests
|
namespace UnitTests;
|
||||||
|
|
||||||
|
public class NotationShould
|
||||||
{
|
{
|
||||||
public class NotationShould
|
[Fact]
|
||||||
|
public void ConvertFromNotationToVector()
|
||||||
{
|
{
|
||||||
[Fact]
|
Notation.FromBoardNotation("A1").Should().Be(new Vector2(0, 0));
|
||||||
public void ConvertFromNotationToVector()
|
Notation.FromBoardNotation("E5").Should().Be(new Vector2(4, 4));
|
||||||
{
|
Notation.FromBoardNotation("I9").Should().Be(new Vector2(8, 8));
|
||||||
Notation.FromBoardNotation("A1").Should().Be(new Vector2(0, 0));
|
Notation.FromBoardNotation("C3").Should().Be(new Vector2(2, 2));
|
||||||
Notation.FromBoardNotation("E5").Should().Be(new Vector2(4, 4));
|
}
|
||||||
Notation.FromBoardNotation("I9").Should().Be(new Vector2(8, 8));
|
|
||||||
Notation.FromBoardNotation("C3").Should().Be(new Vector2(2, 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ConvertFromVectorToNotation()
|
public void ConvertFromVectorToNotation()
|
||||||
{
|
{
|
||||||
Notation.ToBoardNotation(new Vector2(0, 0)).Should().Be("A1");
|
Notation.ToBoardNotation(new Vector2(0, 0)).Should().Be("A1");
|
||||||
Notation.ToBoardNotation(new Vector2(4, 4)).Should().Be("E5");
|
Notation.ToBoardNotation(new Vector2(4, 4)).Should().Be("E5");
|
||||||
Notation.ToBoardNotation(new Vector2(8, 8)).Should().Be("I9");
|
Notation.ToBoardNotation(new Vector2(8, 8)).Should().Be("I9");
|
||||||
Notation.ToBoardNotation(new Vector2(2, 2)).Should().Be("C3");
|
Notation.ToBoardNotation(new Vector2(2, 2)).Should().Be("C3");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using Shogi.Domain.ValueObjects;
|
using Shogi.Domain.ValueObjects;
|
||||||
using Shogi.Domain.YetToBeAssimilatedIntoDDD.Pathing;
|
using Shogi.Domain.ValueObjects.Movement;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace UnitTests;
|
namespace UnitTests;
|
||||||
|
|||||||
@@ -1,460 +1,457 @@
|
|||||||
using Shogi.Domain.ValueObjects;
|
using Shogi.Domain.ValueObjects;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace UnitTests
|
namespace UnitTests;
|
||||||
|
|
||||||
|
public class ShogiShould
|
||||||
{
|
{
|
||||||
public class ShogiShould
|
private readonly ITestOutputHelper console;
|
||||||
|
public ShogiShould(ITestOutputHelper console)
|
||||||
{
|
{
|
||||||
private readonly ITestOutputHelper console;
|
this.console = console;
|
||||||
public ShogiShould(ITestOutputHelper console)
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void MoveAPieceToAnEmptyPosition()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
|
||||||
|
board["A4"].Should().BeNull();
|
||||||
|
var expectedPiece = board["A3"];
|
||||||
|
expectedPiece.Should().NotBeNull();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
shogi.Move("A3", "A4", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
board["A3"].Should().BeNull();
|
||||||
|
board["A4"].Should().Be(expectedPiece);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void AllowValidMoves_AfterCheck()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G7", "G6", false);
|
||||||
|
// P1 Bishop puts P2 in check
|
||||||
|
shogi.Move("B2", "G7", false);
|
||||||
|
board.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
|
||||||
|
// Act - P2 is able to un-check theirself.
|
||||||
|
/// P2 King moves out of check
|
||||||
|
shogi.Move("E9", "E8", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
{
|
{
|
||||||
this.console = console;
|
board.InCheck.Should().BeNull();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void MoveAPieceToAnEmptyPosition()
|
public void PreventInvalidMoves_MoveFromEmptyPosition()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
board["D5"].Should().BeNull();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var moveResult = shogi.Move("D5", "D6", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
board["D5"].Should().BeNull();
|
||||||
|
board["D6"].Should().BeNull();
|
||||||
|
board.Player1Hand.Should().BeEmpty();
|
||||||
|
board.Player2Hand.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidMoves_MoveToCurrentPosition()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
var expectedPiece = board["A3"];
|
||||||
|
|
||||||
|
// Act - P1 "moves" pawn to the position it already exists at.
|
||||||
|
var moveResult = shogi.Move("A3", "A3", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
{
|
{
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
|
|
||||||
board["A4"].Should().BeNull();
|
|
||||||
var expectedPiece = board["A3"];
|
|
||||||
expectedPiece.Should().NotBeNull();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
shogi.Move("A3", "A4", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
board["A3"].Should().BeNull();
|
|
||||||
board["A4"].Should().Be(expectedPiece);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void AllowValidMoves_AfterCheck()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G7", "G6", false);
|
|
||||||
// P1 Bishop puts P2 in check
|
|
||||||
shogi.Move("B2", "G7", false);
|
|
||||||
board.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
|
|
||||||
// Act - P2 is able to un-check theirself.
|
|
||||||
/// P2 King moves out of check
|
|
||||||
shogi.Move("E9", "E8", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
board.InCheck.Should().BeNull();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_MoveFromEmptyPosition()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
board["D5"].Should().BeNull();
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var moveResult = shogi.Move("D5", "D6", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
moveResult.Should().NotBeNull();
|
moveResult.Should().NotBeNull();
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
moveResult.IsSuccess.Should().BeFalse(); board["A3"].Should().Be(expectedPiece);
|
||||||
board["D5"].Should().BeNull();
|
|
||||||
board["D6"].Should().BeNull();
|
|
||||||
board.Player1Hand.Should().BeEmpty();
|
board.Player1Hand.Should().BeEmpty();
|
||||||
board.Player2Hand.Should().BeEmpty();
|
board.Player2Hand.Should().BeEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_MoveToCurrentPosition()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
var expectedPiece = board["A3"];
|
|
||||||
|
|
||||||
// Act - P1 "moves" pawn to the position it already exists at.
|
|
||||||
var moveResult = shogi.Move("A3", "A3", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse(); board["A3"].Should().Be(expectedPiece);
|
|
||||||
board.Player1Hand.Should().BeEmpty();
|
|
||||||
board.Player2Hand.Should().BeEmpty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_MoveSet()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
var expectedPiece = board["D1"];
|
|
||||||
expectedPiece!.WhichPiece.Should().Be(WhichPiece.GoldGeneral);
|
|
||||||
|
|
||||||
// Act - Move General illegally
|
|
||||||
var moveResult = shogi.Move("D1", "D5", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
board["D1"].Should().Be(expectedPiece);
|
|
||||||
board["D5"].Should().BeNull();
|
|
||||||
board.Player1Hand.Should().BeEmpty();
|
|
||||||
board.Player2Hand.Should().BeEmpty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_Ownership()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
var expectedPiece = board["A7"];
|
|
||||||
expectedPiece!.Owner.Should().Be(WhichPlayer.Player2);
|
|
||||||
board.WhoseTurn.Should().Be(WhichPlayer.Player1);
|
|
||||||
|
|
||||||
// Act - Move Player2 Pawn when it is Player1 turn.
|
|
||||||
var moveResult = shogi.Move("A7", "A6", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse(); board["A7"].Should().Be(expectedPiece);
|
|
||||||
board["A6"].Should().BeNull();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_MoveThroughAllies()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
var lance = board["A1"];
|
|
||||||
var pawn = board["A3"];
|
|
||||||
lance!.Owner.Should().Be(pawn!.Owner);
|
|
||||||
|
|
||||||
// Act - Move P1 Lance through P1 Pawn.
|
|
||||||
var moveResult = shogi.Move("A1", "A5", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse(); board["A1"].Should().Be(lance);
|
|
||||||
board["A3"].Should().Be(pawn);
|
|
||||||
board["A5"].Should().BeNull();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_CaptureAlly()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
var knight = board["B1"];
|
|
||||||
var pawn = board["C3"];
|
|
||||||
knight!.Owner.Should().Be(pawn!.Owner);
|
|
||||||
|
|
||||||
// Act - P1 Knight tries to capture P1 Pawn.
|
|
||||||
var moveResult = shogi.Move("B1", "C3", false);
|
|
||||||
|
|
||||||
// Arrange
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse(); board["B1"].Should().Be(knight);
|
|
||||||
board["C3"].Should().Be(pawn);
|
|
||||||
board.Player1Hand.Should().BeEmpty();
|
|
||||||
board.Player2Hand.Should().BeEmpty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidMoves_Check()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G7", "G6", false);
|
|
||||||
// P1 Bishop puts P2 in check
|
|
||||||
shogi.Move("B2", "G7", false);
|
|
||||||
board.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
var lance = board["I9"];
|
|
||||||
|
|
||||||
// Act - P2 moves Lance while in check.
|
|
||||||
var moveResult = shogi.Move("I9", "I8", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse(); board.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
board["I9"].Should().Be(lance);
|
|
||||||
board["I8"].Should().BeNull();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidDrops_MoveSet()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("I7", "I6", false);
|
|
||||||
// P1 Bishop takes P2 Pawn.
|
|
||||||
shogi.Move("B2", "G7", false);
|
|
||||||
// P2 Gold, block check from P1 Bishop.
|
|
||||||
shogi.Move("F9", "F8", false);
|
|
||||||
// P1 Bishop takes P2 Bishop, promotes so it can capture P2 Knight and P2 Lance
|
|
||||||
shogi.Move("G7", "H8", true);
|
|
||||||
// P2 Pawn again
|
|
||||||
shogi.Move("I6", "I5", false);
|
|
||||||
// P1 Bishop takes P2 Knight
|
|
||||||
shogi.Move("H8", "H9", false);
|
|
||||||
// P2 Pawn again
|
|
||||||
shogi.Move("I5", "I4", false);
|
|
||||||
// P1 Bishop takes P2 Lance
|
|
||||||
shogi.Move("H9", "I9", false);
|
|
||||||
// P2 Pawn captures P1 Pawn
|
|
||||||
shogi.Move("I4", "I3", false);
|
|
||||||
board.Player1Hand.Count.Should().Be(4);
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Knight);
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Lance);
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Pawn);
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
|
||||||
board.WhoseTurn.Should().Be(WhichPlayer.Player1);
|
|
||||||
|
|
||||||
// Act | Assert - Illegally placing Knight from the hand in farthest rank.
|
|
||||||
board["H9"].Should().BeNull();
|
|
||||||
var moveResult = shogi.Move(WhichPiece.Knight, "H9");
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
board["H9"].Should().BeNull();
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Knight);
|
|
||||||
|
|
||||||
// Act | Assert - Illegally placing Knight from the hand in second farthest row.
|
|
||||||
board["H8"].Should().BeNull();
|
|
||||||
moveResult = shogi.Move(WhichPiece.Knight, "H8");
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
board["H8"].Should().BeNull();
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Knight);
|
|
||||||
|
|
||||||
// Act | Assert - Illegally place Lance from the hand.
|
|
||||||
board["H9"].Should().BeNull();
|
|
||||||
moveResult = shogi.Move(WhichPiece.Knight, "H9");
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
board["H9"].Should().BeNull();
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Lance);
|
|
||||||
|
|
||||||
// Act | Assert - Illegally place Pawn from the hand.
|
|
||||||
board["H9"].Should().BeNull();
|
|
||||||
moveResult = shogi.Move(WhichPiece.Pawn, "H9");
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
board["H9"].Should().BeNull();
|
|
||||||
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Pawn);
|
|
||||||
|
|
||||||
// // Act | Assert - Illegally place Pawn from the hand in a row which already has an unpromoted Pawn.
|
|
||||||
// // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidDrop_Check()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false).IsSuccess.Should().BeTrue();
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G7", "G6", false).IsSuccess.Should().BeTrue();
|
|
||||||
// P1 Pawn, arbitrary move.
|
|
||||||
shogi.Move("A3", "A4", false).IsSuccess.Should().BeTrue();
|
|
||||||
// P2 Bishop takes P1 Bishop
|
|
||||||
shogi.Move("H8", "B2", false).IsSuccess.Should().BeTrue();
|
|
||||||
// P1 Silver takes P2 Bishop
|
|
||||||
shogi.Move("C1", "B2", false).IsSuccess.Should().BeTrue();
|
|
||||||
// P2 Pawn, arbtrary move
|
|
||||||
shogi.Move("A7", "A6", false).IsSuccess.Should().BeTrue();
|
|
||||||
// P1 drop Bishop, place P2 in check
|
|
||||||
shogi.Move(WhichPiece.Bishop, "G7").IsSuccess.Should().BeTrue();
|
|
||||||
shogi.BoardState.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
shogi.BoardState.Player2Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
|
||||||
shogi.BoardState["E5"].Should().BeNull();
|
|
||||||
|
|
||||||
// Act - P2 places a Bishop while in check.
|
|
||||||
var moveResult = shogi.Move(WhichPiece.Bishop, "E5");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using var scope = new AssertionScope();
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
shogi.BoardState["E5"].Should().BeNull();
|
|
||||||
shogi.BoardState.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
shogi.BoardState.Player2Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void PreventInvalidDrop_Capture()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G7", "G6", false);
|
|
||||||
// P1 Bishop capture P2 Bishop
|
|
||||||
shogi.Move("B2", "H8", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G6", "G5", false);
|
|
||||||
shogi.BoardState.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
|
||||||
shogi.BoardState["I9"].Should().NotBeNull();
|
|
||||||
shogi.BoardState["I9"]!.WhichPiece.Should().Be(WhichPiece.Lance);
|
|
||||||
shogi.BoardState["I9"]!.Owner.Should().Be(WhichPlayer.Player2);
|
|
||||||
|
|
||||||
// Act - P1 tries to place a piece where an opponent's piece resides.
|
|
||||||
var moveResult = shogi.Move(WhichPiece.Bishop, "I9");
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using var scope = new AssertionScope();
|
|
||||||
moveResult.Should().NotBeNull();
|
|
||||||
moveResult.IsSuccess.Should().BeFalse();
|
|
||||||
shogi.BoardState.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
|
||||||
shogi.BoardState["I9"].Should().NotBeNull();
|
|
||||||
shogi.BoardState["I9"]!.WhichPiece.Should().Be(WhichPiece.Lance);
|
|
||||||
shogi.BoardState["I9"]!.Owner.Should().Be(WhichPlayer.Player2);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void Check()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G7", "G6", false);
|
|
||||||
|
|
||||||
// Act - P1 Bishop, check
|
|
||||||
shogi.Move("B2", "G7", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
board.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void Promote()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("G7", "G6", false);
|
|
||||||
|
|
||||||
// Act - P1 moves across promote threshold.
|
|
||||||
shogi.Move("B2", "G7", true);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
using (new AssertionScope())
|
|
||||||
{
|
|
||||||
board["B2"].Should().BeNull();
|
|
||||||
board["G7"].Should().NotBeNull();
|
|
||||||
board["G7"]!.WhichPiece.Should().Be(WhichPiece.Bishop);
|
|
||||||
board["G7"]!.Owner.Should().Be(WhichPlayer.Player1);
|
|
||||||
board["G7"]!.IsPromoted.Should().BeTrue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void Capture()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
var p1Bishop = board["B2"];
|
|
||||||
p1Bishop!.WhichPiece.Should().Be(WhichPiece.Bishop);
|
|
||||||
shogi.Move("C3", "C4", false);
|
|
||||||
shogi.Move("G7", "G6", false);
|
|
||||||
|
|
||||||
// Act - P1 Bishop captures P2 Bishop
|
|
||||||
shogi.Move("B2", "H8", false);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
board["B2"].Should().BeNull();
|
|
||||||
board["H8"].Should().Be(p1Bishop);
|
|
||||||
|
|
||||||
board
|
|
||||||
.Player1Hand
|
|
||||||
.Should()
|
|
||||||
.ContainSingle(p => p.WhichPiece == WhichPiece.Bishop && p.Owner == WhichPlayer.Player1);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void CheckMate()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var shogi = MockShogiBoard();
|
|
||||||
var board = shogi.BoardState;
|
|
||||||
// P1 Rook
|
|
||||||
shogi.Move("H2", "E2", false);
|
|
||||||
// P2 Gold
|
|
||||||
shogi.Move("F9", "G8", false);
|
|
||||||
// P1 Pawn
|
|
||||||
shogi.Move("E3", "E4", false);
|
|
||||||
// P2 other Gold
|
|
||||||
shogi.Move("D9", "C8", false);
|
|
||||||
// P1 same Pawn
|
|
||||||
shogi.Move("E4", "E5", false);
|
|
||||||
// P2 Pawn
|
|
||||||
shogi.Move("E7", "E6", false);
|
|
||||||
// P1 Pawn takes P2 Pawn
|
|
||||||
shogi.Move("E5", "E6", false);
|
|
||||||
// P2 King
|
|
||||||
shogi.Move("E9", "E8", false);
|
|
||||||
// P1 Pawn promotes; threatens P2 King
|
|
||||||
shogi.Move("E6", "E7", true);
|
|
||||||
// P2 King retreat
|
|
||||||
shogi.Move("E8", "E9", false);
|
|
||||||
|
|
||||||
// Act - P1 Pawn wins by checkmate.
|
|
||||||
shogi.Move("E7", "E8", false);
|
|
||||||
|
|
||||||
// Assert - checkmate
|
|
||||||
board.IsCheckmate.Should().BeTrue();
|
|
||||||
board.InCheck.Should().Be(WhichPlayer.Player2);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ShogiBoard MockShogiBoard() => new(BoardState.StandardStarting);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidMoves_MoveSet()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
var expectedPiece = board["D1"];
|
||||||
|
expectedPiece!.WhichPiece.Should().Be(WhichPiece.GoldGeneral);
|
||||||
|
|
||||||
|
// Act - Move General illegally
|
||||||
|
var moveResult = shogi.Move("D1", "D5", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
|
{
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
board["D1"].Should().Be(expectedPiece);
|
||||||
|
board["D5"].Should().BeNull();
|
||||||
|
board.Player1Hand.Should().BeEmpty();
|
||||||
|
board.Player2Hand.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidMoves_Ownership()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
var expectedPiece = board["A7"];
|
||||||
|
expectedPiece!.Owner.Should().Be(WhichPlayer.Player2);
|
||||||
|
board.WhoseTurn.Should().Be(WhichPlayer.Player1);
|
||||||
|
|
||||||
|
// Act - Move Player2 Pawn when it is Player1 turn.
|
||||||
|
var moveResult = shogi.Move("A7", "A6", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
|
{
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse(); board["A7"].Should().Be(expectedPiece);
|
||||||
|
board["A6"].Should().BeNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidMoves_MoveThroughAllies()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
var lance = board["A1"];
|
||||||
|
var pawn = board["A3"];
|
||||||
|
lance!.Owner.Should().Be(pawn!.Owner);
|
||||||
|
|
||||||
|
// Act - Move P1 Lance through P1 Pawn.
|
||||||
|
var moveResult = shogi.Move("A1", "A5", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
|
{
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse(); board["A1"].Should().Be(lance);
|
||||||
|
board["A3"].Should().Be(pawn);
|
||||||
|
board["A5"].Should().BeNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidMoves_CaptureAlly()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
var knight = board["B1"];
|
||||||
|
var pawn = board["C3"];
|
||||||
|
knight!.Owner.Should().Be(pawn!.Owner);
|
||||||
|
|
||||||
|
// Act - P1 Knight tries to capture P1 Pawn.
|
||||||
|
var moveResult = shogi.Move("B1", "C3", false);
|
||||||
|
|
||||||
|
// Arrange
|
||||||
|
using (new AssertionScope())
|
||||||
|
{
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse(); board["B1"].Should().Be(knight);
|
||||||
|
board["C3"].Should().Be(pawn);
|
||||||
|
board.Player1Hand.Should().BeEmpty();
|
||||||
|
board.Player2Hand.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidMoves_Check()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G7", "G6", false);
|
||||||
|
// P1 Bishop puts P2 in check
|
||||||
|
shogi.Move("B2", "G7", false);
|
||||||
|
board.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
var lance = board["I9"];
|
||||||
|
|
||||||
|
// Act - P2 moves Lance while in check.
|
||||||
|
var moveResult = shogi.Move("I9", "I8", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
|
{
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse(); board.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
board["I9"].Should().Be(lance);
|
||||||
|
board["I8"].Should().BeNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidDrops_MoveSet()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("I7", "I6", false);
|
||||||
|
// P1 Bishop takes P2 Pawn.
|
||||||
|
shogi.Move("B2", "G7", false);
|
||||||
|
// P2 Gold, block check from P1 Bishop.
|
||||||
|
shogi.Move("F9", "F8", false);
|
||||||
|
// P1 Bishop takes P2 Bishop, promotes so it can capture P2 Knight and P2 Lance
|
||||||
|
shogi.Move("G7", "H8", true);
|
||||||
|
// P2 Pawn again
|
||||||
|
shogi.Move("I6", "I5", false);
|
||||||
|
// P1 Bishop takes P2 Knight
|
||||||
|
shogi.Move("H8", "H9", false);
|
||||||
|
// P2 Pawn again
|
||||||
|
shogi.Move("I5", "I4", false);
|
||||||
|
// P1 Bishop takes P2 Lance
|
||||||
|
shogi.Move("H9", "I9", false);
|
||||||
|
// P2 Pawn captures P1 Pawn
|
||||||
|
shogi.Move("I4", "I3", false);
|
||||||
|
board.Player1Hand.Count.Should().Be(4);
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Knight);
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Lance);
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Pawn);
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
||||||
|
board.WhoseTurn.Should().Be(WhichPlayer.Player1);
|
||||||
|
|
||||||
|
// Act | Assert - Illegally placing Knight from the hand in farthest rank.
|
||||||
|
board["H9"].Should().BeNull();
|
||||||
|
var moveResult = shogi.Move(WhichPiece.Knight, "H9");
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
board["H9"].Should().BeNull();
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Knight);
|
||||||
|
|
||||||
|
// Act | Assert - Illegally placing Knight from the hand in second farthest row.
|
||||||
|
board["H8"].Should().BeNull();
|
||||||
|
moveResult = shogi.Move(WhichPiece.Knight, "H8");
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
board["H8"].Should().BeNull();
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Knight);
|
||||||
|
|
||||||
|
// Act | Assert - Illegally place Lance from the hand.
|
||||||
|
board["H9"].Should().BeNull();
|
||||||
|
moveResult = shogi.Move(WhichPiece.Knight, "H9");
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
board["H9"].Should().BeNull();
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Lance);
|
||||||
|
|
||||||
|
// Act | Assert - Illegally place Pawn from the hand.
|
||||||
|
board["H9"].Should().BeNull();
|
||||||
|
moveResult = shogi.Move(WhichPiece.Pawn, "H9");
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
board["H9"].Should().BeNull();
|
||||||
|
board.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Pawn);
|
||||||
|
|
||||||
|
// // Act | Assert - Illegally place Pawn from the hand in a row which already has an unpromoted Pawn.
|
||||||
|
// // TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidDrop_Check()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false).IsSuccess.Should().BeTrue();
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G7", "G6", false).IsSuccess.Should().BeTrue();
|
||||||
|
// P1 Pawn, arbitrary move.
|
||||||
|
shogi.Move("A3", "A4", false).IsSuccess.Should().BeTrue();
|
||||||
|
// P2 Bishop takes P1 Bishop
|
||||||
|
shogi.Move("H8", "B2", false).IsSuccess.Should().BeTrue();
|
||||||
|
// P1 Silver takes P2 Bishop
|
||||||
|
shogi.Move("C1", "B2", false).IsSuccess.Should().BeTrue();
|
||||||
|
// P2 Pawn, arbtrary move
|
||||||
|
shogi.Move("A7", "A6", false).IsSuccess.Should().BeTrue();
|
||||||
|
// P1 drop Bishop, place P2 in check
|
||||||
|
shogi.Move(WhichPiece.Bishop, "G7").IsSuccess.Should().BeTrue();
|
||||||
|
shogi.BoardState.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
shogi.BoardState.Player2Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
||||||
|
shogi.BoardState["E5"].Should().BeNull();
|
||||||
|
|
||||||
|
// Act - P2 places a Bishop while in check.
|
||||||
|
var moveResult = shogi.Move(WhichPiece.Bishop, "E5");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using var scope = new AssertionScope();
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
shogi.BoardState["E5"].Should().BeNull();
|
||||||
|
shogi.BoardState.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
shogi.BoardState.Player2Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void PreventInvalidDrop_Capture()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G7", "G6", false);
|
||||||
|
// P1 Bishop capture P2 Bishop
|
||||||
|
shogi.Move("B2", "H8", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G6", "G5", false);
|
||||||
|
shogi.BoardState.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
||||||
|
shogi.BoardState["I9"].Should().NotBeNull();
|
||||||
|
shogi.BoardState["I9"]!.WhichPiece.Should().Be(WhichPiece.Lance);
|
||||||
|
shogi.BoardState["I9"]!.Owner.Should().Be(WhichPlayer.Player2);
|
||||||
|
|
||||||
|
// Act - P1 tries to place a piece where an opponent's piece resides.
|
||||||
|
var moveResult = shogi.Move(WhichPiece.Bishop, "I9");
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using var scope = new AssertionScope();
|
||||||
|
moveResult.Should().NotBeNull();
|
||||||
|
moveResult.IsSuccess.Should().BeFalse();
|
||||||
|
shogi.BoardState.Player1Hand.Should().ContainSingle(_ => _.WhichPiece == WhichPiece.Bishop);
|
||||||
|
shogi.BoardState["I9"].Should().NotBeNull();
|
||||||
|
shogi.BoardState["I9"]!.WhichPiece.Should().Be(WhichPiece.Lance);
|
||||||
|
shogi.BoardState["I9"]!.Owner.Should().Be(WhichPlayer.Player2);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Check()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G7", "G6", false);
|
||||||
|
|
||||||
|
// Act - P1 Bishop, check
|
||||||
|
shogi.Move("B2", "G7", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
board.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Promote()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("G7", "G6", false);
|
||||||
|
|
||||||
|
// Act - P1 moves across promote threshold.
|
||||||
|
shogi.Move("B2", "G7", true);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
using (new AssertionScope())
|
||||||
|
{
|
||||||
|
board["B2"].Should().BeNull();
|
||||||
|
board["G7"].Should().NotBeNull();
|
||||||
|
board["G7"]!.WhichPiece.Should().Be(WhichPiece.Bishop);
|
||||||
|
board["G7"]!.Owner.Should().Be(WhichPlayer.Player1);
|
||||||
|
board["G7"]!.IsPromoted.Should().BeTrue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Capture()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
var p1Bishop = board["B2"];
|
||||||
|
p1Bishop!.WhichPiece.Should().Be(WhichPiece.Bishop);
|
||||||
|
shogi.Move("C3", "C4", false);
|
||||||
|
shogi.Move("G7", "G6", false);
|
||||||
|
|
||||||
|
// Act - P1 Bishop captures P2 Bishop
|
||||||
|
shogi.Move("B2", "H8", false);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
board["B2"].Should().BeNull();
|
||||||
|
board["H8"].Should().Be(p1Bishop);
|
||||||
|
|
||||||
|
board
|
||||||
|
.Player1Hand
|
||||||
|
.Should()
|
||||||
|
.ContainSingle(p => p.WhichPiece == WhichPiece.Bishop && p.Owner == WhichPlayer.Player1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void CheckMate()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
var shogi = MockShogiBoard();
|
||||||
|
var board = shogi.BoardState;
|
||||||
|
// P1 Rook
|
||||||
|
shogi.Move("H2", "E2", false);
|
||||||
|
// P2 Gold
|
||||||
|
shogi.Move("F9", "G8", false);
|
||||||
|
// P1 Pawn
|
||||||
|
shogi.Move("E3", "E4", false);
|
||||||
|
// P2 other Gold
|
||||||
|
shogi.Move("D9", "C8", false);
|
||||||
|
// P1 same Pawn
|
||||||
|
shogi.Move("E4", "E5", false);
|
||||||
|
// P2 Pawn
|
||||||
|
shogi.Move("E7", "E6", false);
|
||||||
|
// P1 Pawn takes P2 Pawn
|
||||||
|
shogi.Move("E5", "E6", false);
|
||||||
|
// P2 King
|
||||||
|
shogi.Move("E9", "E8", false);
|
||||||
|
// P1 Pawn promotes; threatens P2 King
|
||||||
|
shogi.Move("E6", "E7", true);
|
||||||
|
// P2 King retreat
|
||||||
|
shogi.Move("E8", "E9", false);
|
||||||
|
|
||||||
|
// Act - P1 Pawn wins by checkmate.
|
||||||
|
shogi.Move("E7", "E8", false);
|
||||||
|
|
||||||
|
// Assert - checkmate
|
||||||
|
board.IsCheckmate.Should().BeTrue();
|
||||||
|
board.InCheck.Should().Be(WhichPlayer.Player2);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ShogiBoard MockShogiBoard() => new(BoardState.StandardStarting);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user