Class: GameStates

Inherits:
Enum
  • Object
show all
Defined in:
game/game_states.rb

Overview

GameStates inherits from Enum in order to implement a series of game states. This allows for easy handling of branching during the games loop.

Author:

  • Joseph Beck

Instance Attribute Summary collapse

Method Summary

Methods inherited from Enum

enum_attr, #initialize, #to_i

Constructor Details

This class inherits a constructor from Enum

Instance Attribute Details

#:initializing, :guessing, :waiting, :finished(: initializing, : guessing, : waiting, : finished) ⇒ Object

Initializes the different potential states of the game. Each is assigned an = method and a ? method for assigning and checking of parity.



17
# File 'game/game_states.rb', line 17

enum_attr :initializing,  1