Implementation - Ahemmetter/royal-game-of-ur GitHub Wiki

The game is implemented in Python and Tkinter. Tkinter provides an event loop into which all actions of the game need to be inserted.

Features

  • Stones can be selected by clicking and placed by clicking on an allowed square
  • Upon selecting a stone, the available moves are shown on the board
  • The game's state is displayed in the status bar ("Black's turn", "Not possible to move there")
  • It is possible to select any stone from the pile of unused stones, not only the first one
  • The computer's move is delayed by half a second to make the moves more accesible to the user
  • Freed stones are displayed in a golden color
  • The game's language (interface) can be changed through a preference menu. The available languages so far are English (default), German and Russian. Support for Spanish, French and Esperanto is planned. The strings are stored in a separate file and are imported at the beginning of the program
  • The game's language can be changed during the game without affecting the game state
  • The winner is displayed as a popup (alert) window
  • The game can be restarted and exited with a menu option

Issues and Future Tasks

  • Sometimes there seems to appear an error, where it is not allowed to make any more moves, even though there are possible ones left
  • It is not possible to skip a move, if there are no possible moves left (for example all stones are blocked)
  • Sometimes it happens that the other player is skipped several times in a row. This might be due to the fact that they throw a 0 each time
  • The ruleset should be allowed to be changed (different paths, different meanings of the special fields)
  • The colors and general theme could be allowed to be changed
  • The game window can be resized, but the canvas itself does not adapt to the window size. This could be made relative to account for resized windows
  • The language does not update immediately, but only after the first move
  • An icon should be added to be displayed in the taskbar/dock
  • The game should be packaged to be used even without a Python installation (exe/dmg)