Closed kirangp closed 8 years ago
Hey @kirangp I think the idea is that some methods deal with user input and thus use a 1-9 argument and some are more 'internal' and take a 0-8 argument. So the specs test accordingly. We are looking into perhaps a more consistent approach across the Tic-Tac-Toe labs. and I'll update the README to stress this in the appropriate methods. I'm going to close this issue. Thanks so much for the submission!!
Hi, In some of the tests the positions in the board are 1-9 & in another test case it uses 0-8. Please use a consistent 1-9 approach in tests. I have added the test cases below. Thanks
Example describe '#move' do it 'allows "X" player in the top left and "O" in the middle' do game = TicTacToe.new game.move(1, "X") game.move(5, "O")
describe '#position_taken?' do it 'returns true/false based on position in board' do game = TicTacToe.new board = ["X", " ", " ", " ", " ", " ", " ", " ", "O"] game.instance_variable_set(:@board, board)