Skip to content

Commit

Permalink
Replaced game#in_progress? with game#over?
Browse files Browse the repository at this point in the history
  • Loading branch information
lisahamm committed Mar 12, 2015
1 parent de4625d commit e931758
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tic_tac_toe_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TicTacToeController < Sinatra::Base
move = params[:move].to_i
game.take_turn(move)

if !game.in_progress?
if game.over?
session[:moves] = game.board_to_array
redirect to('/game_over')
end
Expand All @@ -53,7 +53,7 @@ class TicTacToeController < Sinatra::Base

session[:moves] = game.board_to_array
session[:current_player_mark] = game.current_player_mark
redirect to('/game_over') if !game.in_progress?
redirect to('/game_over') if game.over?
redirect to('/game')
end

Expand Down

0 comments on commit e931758

Please sign in to comment.