Skip to content

Commit

Permalink
Changed Board default argument
Browse files Browse the repository at this point in the history
  • Loading branch information
lisahamm committed Mar 11, 2015
1 parent c0c11f5 commit 5309b1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tic_tac_toe/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Game
attr_accessor :board, :current_player_mark
attr_reader :player1, :player2

def initialize(player1_mark, player2_mark, current_player_mark, cells=nil)
@board = Board.new(cells)
def initialize(player1_mark, player2_mark, current_player_mark, board=nil)
@board = board ||= Board.new
@player1 = player1_mark
@player2 = player2_mark
@current_player_mark = current_player_mark
Expand Down
Binary file added tic_tac_toe-0.0.1.gem
Binary file not shown.

0 comments on commit 5309b1d

Please sign in to comment.