internal bool Exists(Move move, Field near, Field far) { bool result = false; if (move.Hash == 0) { if (!CanMove(near, far)) throw new InvalidOperationException(); { Use(); near.Free(); far.Free(); } result = move.Update(board); { Free(); near.Use(); far.Use(); } return result; } return board.Exists(move.Hash); }
internal bool DoMove(Move move, Field near, Field far) { if (!CanMove(near, far)) return false; if (Use() && near.Free() && far.Free()) { board.DoMove(this, near, far, move); return true; } return false; }