yep
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Socket.Types;
|
||||
using Gameboard.ShogiUI.Sockets.ServiceModels.Types;
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -26,12 +26,12 @@ namespace Gameboard.ShogiUI.Sockets.Extensions
|
||||
return name;
|
||||
}
|
||||
|
||||
public static void PrintStateAsAscii(this Models.Shogi self)
|
||||
public static string PrintStateAsAscii(this Models.Shogi self)
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
builder.Append(" Player 2(.)");
|
||||
builder.AppendLine();
|
||||
for (var y = 0; y < 9; y++)
|
||||
for (var y = 8; y >= 0; y--)
|
||||
{
|
||||
builder.Append("- ");
|
||||
for (var x = 0; x < 8; x++) builder.Append("- - ");
|
||||
@@ -40,7 +40,7 @@ namespace Gameboard.ShogiUI.Sockets.Extensions
|
||||
builder.Append('|');
|
||||
for (var x = 0; x < 9; x++)
|
||||
{
|
||||
var piece = self.Board[y, x];
|
||||
var piece = self.Board[x, y];
|
||||
if (piece == null)
|
||||
{
|
||||
builder.Append(" ");
|
||||
@@ -58,7 +58,7 @@ namespace Gameboard.ShogiUI.Sockets.Extensions
|
||||
builder.Append("- -");
|
||||
builder.AppendLine();
|
||||
builder.Append(" Player 1");
|
||||
Console.WriteLine(builder.ToString());
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user