Hi, I can’t seem to figure out how to display the board for the human player class. I even pasted in the answer for the display method and I still got an error, which is the following: HumanPlayer #display prints the board to the screen Failure/Error: human.display(board) NoMethodError: undefined method []' for #<Board:0x007ffb099759f8> # ./lib/human_player.rb:24:inblock in display’
# ./lib/human_player.rb:23:in each' # ./lib/human_player.rb:23:indisplay’
# ./spec/human_player_spec.rb:62:in block (3 levels) in <top (required)>
I’m not sure what to do, and I don’t know if my code from the previous board class is causing the problem. Any help would be appreciated. I can post the code that I wrote for the board class if that would help as well.
I think we talked about this in the discussion tab, but I just wanted to double check that you were able to move forward. I think the issue had to do with understanding the attr_accessor and writing your own [] methods. Let me know!
Hi! I have the same question as this post, but it was never fully answered. Can you explain what the [] method is? I tried looking it up online and nothing showed up