Skip to content

Instantly share code, notes, and snippets.

@tra38
Created January 2, 2016 20:36
Show Gist options
  • Save tra38/00eb7049f2c1c8084218 to your computer and use it in GitHub Desktop.
Save tra38/00eb7049f2c1c8084218 to your computer and use it in GitHub Desktop.
Matcher: #<Mutant::Matcher::Config match_expressions: [Game]>
Integration: Mutant::Integration::Rspec
Expect Coverage: 100.00%
Jobs: 4
Includes: ["lib"]
Requires: ["game"]
Subjects: 10
Mutations: 422
Results: 422
Kills: 319
Alive: 103
Runtime: 48.52s
Killtime: 123.78s
Overhead: -60.80%
Mutations/s: 8.70
Coverage: 75.59%
Expected: 100.00%
Active subjects: 0
Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:fcab9
@@ -1,7 +1,7 @@
def get_computer_spot
- index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
+ index = current_player.fitness_calculator(opponent: next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:e9488
@@ -1,7 +1,7 @@
def get_computer_spot
- index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
+ index = current_player.fitness_calculator(opponent: self.next_player, board: board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:eee6c
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
- self.board[index.to_i] = current_player.symbol
+ self.board[Integer(index)] = current_player.symbol
spot = translate_index_to_spot(index)
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:12f64
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
- spot = translate_index_to_spot(index)
+ spot = self
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:1a533
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
- spot = translate_index_to_spot(index)
+ spot = nil
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:167c6
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
- spot = translate_index_to_spot(index)
+ spot = index
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:3e985
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
- spot = translate_index_to_spot(index)
+ spot = translate_index_to_spot(nil)
return spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:b6c28
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
- return spot
+ nil
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:5e5ee
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
- return spot
+ self
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:a4759
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
- return spot
+ spot
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:8cc5a
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
- return spot
+ return nil
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:15f9a
@@ -1,7 +1,7 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
- return spot
+ return self
end
-----------------------
evil:Game#get_computer_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:61:21391
@@ -1,7 +1,6 @@
def get_computer_spot
index = current_player.fitness_calculator(opponent: self.next_player, board: self.board)
self.board[index.to_i] = current_player.symbol
spot = translate_index_to_spot(index)
- return spot
end
-----------------------
Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:d176f
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
- return spot
+ nil
else
View.display_error(spot)
get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:ebd38
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
- return spot
+ spot
else
View.display_error(spot)
get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:d0b8a
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
- return spot
+ self
else
View.display_error(spot)
get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:50381
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
- return spot
+ return nil
else
View.display_error(spot)
get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:b3352
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
- return spot
+ return self
else
View.display_error(spot)
get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:06869
@@ -1,12 +1,11 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
- return spot
else
View.display_error(spot)
get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:1ec93
@@ -1,12 +1,11 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
return spot
else
View.display_error(spot)
- get_human_spot
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:2a915
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
return spot
else
View.display_error(spot)
- get_human_spot
+ nil
end
end
-----------------------
evil:Game#get_human_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:45:ce9f3
@@ -1,12 +1,12 @@
def get_human_spot
spot = human_input
index = translate_spot_to_index(spot)
if valid_move?(index)
self.board[index] = current_player.symbol
return spot
else
View.display_error(spot)
- get_human_spot
+ self
end
end
-----------------------
Game#get_next_move:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:21
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#get_next_move:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:21:8ee58
@@ -1,8 +1,8 @@
def get_next_move
- if (current_player.type == :human)
+ if current_player.type.eql?(:human)
get_human_spot
else
get_computer_spot
end
end
-----------------------
evil:Game#get_next_move:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:21:f03d1
@@ -1,8 +1,8 @@
def get_next_move
- if (current_player.type == :human)
+ if current_player.type.equal?(:human)
get_human_spot
else
get_computer_spot
end
end
-----------------------
Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:cd077
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ raise
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:78064
@@ -1,4 +1,3 @@
def has_ended?
- someone_won?(board) || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:3a249
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ nil
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:985f9
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ self
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:3fbf2
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:bb529
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:df6f3
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) && tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:1a226
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ (!someone_won?(board)) || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:39bfc
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ nil || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:ca756
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ self || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:43e72
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ board || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:a5114
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(nil) || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:3d092
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won? || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:595ab
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(self) || tie?(board)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:299f4
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) || self
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:7707b
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) || nil
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:6d0a9
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) || board
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:1aab7
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) || tie?
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:6fc0c
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) || tie?(nil)
end
-----------------------
evil:Game#has_ended?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:17:dbc7b
@@ -1,4 +1,4 @@
def has_ended?
- someone_won?(board) || tie?(board)
+ someone_won?(board) || tie?(self)
end
-----------------------
Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41:b2c52
@@ -1,4 +1,3 @@
def human_input
- gets.chomp
end
-----------------------
evil:Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41:88ea8
@@ -1,4 +1,4 @@
def human_input
- gets.chomp
+ raise
end
-----------------------
evil:Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41:25fa6
@@ -1,4 +1,4 @@
def human_input
- gets.chomp
+ nil
end
-----------------------
evil:Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41:a274c
@@ -1,4 +1,4 @@
def human_input
- gets.chomp
+ gets
end
-----------------------
evil:Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41:ea0a1
@@ -1,4 +1,4 @@
def human_input
- gets.chomp
+ self
end
-----------------------
evil:Game#human_input:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:41:1562b
@@ -1,4 +1,4 @@
def human_input
- gets.chomp
+ self.chomp
end
-----------------------
Game#initialize:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:11
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#initialize:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:11:23c3e
@@ -1,6 +1,6 @@
def initialize(args)
- @board = args[:board]
+ @board = args.fetch(:board)
@current_player = args[:player_one]
@next_player = args[:player_two]
end
-----------------------
evil:Game#initialize:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:11:808fa
@@ -1,6 +1,6 @@
def initialize(args)
@board = args[:board]
- @current_player = args[:player_one]
+ @current_player = args.fetch(:player_one)
@next_player = args[:player_two]
end
-----------------------
evil:Game#initialize:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:11:827ee
@@ -1,6 +1,6 @@
def initialize(args)
@board = args[:board]
@current_player = args[:player_one]
- @next_player = args[:player_two]
+ @next_player = args.fetch(:player_two)
end
-----------------------
Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:09202
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ nil
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:fc049
@@ -1,4 +1,3 @@
def translate_index_to_spot(index)
- index.to_i + 1
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:09c69
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ self
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:69022
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ index.to_i
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:40445
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ Integer(index) + 1
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:0d79f
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ 1
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:87937
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ index.to_i + (-1)
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:ef2cc
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ index.to_i + 0
end
-----------------------
evil:Game#translate_index_to_spot:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:37:72564
@@ -1,4 +1,4 @@
def translate_index_to_spot(index)
- index.to_i + 1
+ index.to_i + 2
end
-----------------------
Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57
- rspec:0:./spec/game_spec.rb:10/Game starts with a blank board
- rspec:1:./spec/game_spec.rb:15/Game allows humans to make moves - allows player to move
- rspec:2:./spec/game_spec.rb:23/Game rejects invalid moves by humans - rejects 10 as an invalid input
- rspec:3:./spec/game_spec.rb:29/Game rejects invalid moves by humans - rejects 0 as an invalid input
- rspec:4:./spec/game_spec.rb:35/Game rejects invalid moves by humans - rejects words as an invalid input
- rspec:5:./spec/game_spec.rb:41/Game rejects invalid moves by humans - reject spaces already taken
- rspec:6:./spec/game_spec.rb:49/Game allows computer to make moves - successfully makes move after the human
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:b4c92
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ ((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:4ce83
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ ((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:ec9a9
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0...8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:609dc
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((1..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:b2165
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..7).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:70bdc
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:d7056
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_int) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:d3b76
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(Integer(index)) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:26f28
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board.at(index.to_i) != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:3c80a
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board.fetch(index.to_i) != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:82c2a
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:fa4d2
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_int] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:2dea2
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[Integer(index)] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:5f503
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:09c71
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (!board[index.to_i].eql?(self.current_player.symbol))) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:5fbd9
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (!board[index.to_i].equal?(self.current_player.symbol))) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:9bbf1
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && self) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:42083
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && board[index.to_i]) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:b4a66
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (nil != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:74062
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (self != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:1450f
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:b77d0
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board.at(index.to_i) != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:527ae
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board.fetch(index.to_i) != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:7e6d6
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (index.to_i != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:0888a
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:c85c5
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_int] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:87243
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[Integer(index)] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:60c0d
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && self.next_player.symbol) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:17b75
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != nil)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:93bc6
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:5104e
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:18c9e
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != next_player.symbol)) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:099ed
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (!board[index.to_i].eql?(self.next_player.symbol))) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:62e7e
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (!board[index.to_i].equal?(self.next_player.symbol))) && (index.to_i.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:3b9d1
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && self
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:2a843
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && index.to_i.to_s
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:bc651
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:10ff8
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_int.to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:9b6e2
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (Integer(index).to_s == index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:07f4b
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && index.to_i.to_s.eql?(index.to_s)
end
-----------------------
evil:Game#valid_move?:/Users/tariqali/Documents/experiments/Tic-Tac-Toe-Challenge/lib/game.rb:57:11cfd
@@ -1,4 +1,4 @@
def valid_move?(index)
- (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && (index.to_i.to_s == index.to_s)
+ (((0..8).include?(index.to_i) && (board[index.to_i] != self.current_player.symbol)) && (board[index.to_i] != self.next_player.symbol)) && index.to_s
end
-----------------------
Mutant configuration:
Matcher: #<Mutant::Matcher::Config match_expressions: [Game]>
Integration: Mutant::Integration::Rspec
Expect Coverage: 100.00%
Jobs: 4
Includes: ["lib"]
Requires: ["game"]
Subjects: 10
Mutations: 422
Results: 422
Kills: 319
Alive: 103
Runtime: 48.52s
Killtime: 123.78s
Overhead: -60.80%
Mutations/s: 8.70
Coverage: 75.59%
Expected: 100.00%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment