public void Print() { for (int y = 1; y <= YSize; y++) { for (int x = 1; x <= XSize; x++) { Footmark fm = this[x, y] as Footmark; if (fm != null) { Console.Write("{0} ", fm.Count); } else { Console.Write("{0} ", this[x, y].Value); } } Console.WriteLine(""); } Console.WriteLine(); }
// 利き筋には、Footmarkを配置する public void Put(int place) { this[place] = Piece.Knight; foreach (var dest in Destinations(place)) { var fm = this[dest] as Footmark; if (fm == null) { this[dest] = new Footmark() { Count = 1 } } ; else { fm.Count++; } } }