ychess is a chess implementation written in nim.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
433 B

  1. import ./chess
  2. # Testing
  3. var game = chess.init_game()
  4. game.checked_move(field_to_ind("e2"),field_to_ind("e4"),Color.White)
  5. game.checked_move(field_to_ind("e7"),field_to_ind("e6"),Color.Black)
  6. game.checked_move(field_to_ind("g2"),field_to_ind("g4"),Color.White)
  7. game.checked_move(field_to_ind("d8"),field_to_ind("h4"),Color.Black)
  8. game.echo_board(Color.White)
  9. echo game.is_checkmate(Color.White)
  10. echo game.is_stalemate(Color.White)