Functions required by game.rb