dimanche 28 octobre 2018

Ruby Test - Connect four

I am self-learning the Ruby language. Recently, I have came up with an exercise to solve some test related to Connect 4. Unfortunately I am unable to pass the test. Specifically, what the test requires is to:

  it "should set token of player 1 to O" do
                @game.setplayer1
                @game.player1.should eql "O"
            end

And also

it "should get token of player 1" do
                @game.setplayer1
                @game.getplayer1.should eql "O"
            end

Any ideas on how I could pass these tests?

Thank you in advance

Aucun commentaire:

Enregistrer un commentaire