-
Notifications
You must be signed in to change notification settings - Fork 47
week1
zmontesd edited this page Feb 6, 2013
·
2 revisions
$ game = Game.new
$ game.board
- Calling on board (an array of arrays)
$ game.board[0][0] = 'red'
[0][0] is the default position for bottom left 1st is column, 2nd is the row
$ puts game.pretty_print
$ game.current
$ game.current_player
$ game.status
*Responses
=> in progress
=> red *player 1
=> blue *player 2
-
saving your game:
$ game.save!
-
prompt line to display all the connect four method:
$ ls
command to run rspec
$ rspec spec *running all specifications
$ rspec spec/filename *running specific file
$ rspec spec/filename line *running specific line in file