Пример #1
0
 private static bool isValidMove(Coin[,] state, Move m)
 {
     return
         isUsefulMove(state, m.Cell, m.DestinationCell()) ||
         isUsefulMove(state, m.DestinationCell(), m.Cell)
         ;
 }
Пример #2
0
 private static Coin[,] exchange(Coin[,] state, Move move)
 {
     Coin[,] result = Clone(state);
     result.put(move.DestinationCell(), state.get(move.Cell));
     result.put(move.Cell, state.get(move.DestinationCell()));
     return result;
 }