Help for beginner

Can someone tell me why this app doesnt work? It always says "missed"
even if array include 'shot'.

···

--
Posted via http://www.ruby-forum.com/.

because your checkShot() param is being passed as a string. The elements
of @tab are integers. Convert "shot" to an integer before testing:

    shot = shot.to_i
    @u = @tab.include?(shot)

Hope that helps

- jethrow

···

--
Posted via http://www.ruby-forum.com/.

Thank You :slight_smile:

···

--
Posted via http://www.ruby-forum.com/.