checkpoint

This commit is contained in:
2021-02-23 18:03:23 -06:00
parent 8d79c75616
commit f644795cd3
38 changed files with 1451 additions and 177 deletions

View File

@@ -0,0 +1,19 @@
using System;
namespace Gameboard.ShogiUI.BoardState
{
public static class Extensions
{
public static void ForEachNotNull(this Piece[,] array, Action<Piece, int, int> action)
{
for (var x = 0; x < array.GetLength(0); x++)
for (var y = 0; y < array.GetLength(1); y++)
{
var piece = array[x, y];
if (piece != null)
{
action(piece, x, y);
}
}
}
}
}