Skip to content

lefrancoismathilde/02-Longest-word-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Background & Objectives

Time to re-implement your "Longest-word game" with a cool web-interface. You can use the code in the solution to 01-Ruby/06-Parsing/02-Numbers-and-Letters as a starting point.

Specs

Herebelow is how your game should work. We only give you the routing structure. Your call to generate the relevant controller, actions and views.

  • GET '/game': render the page with a new random grid of words, and the HTML form to write your guess just below the word-grid.

  • GET '/score' should compute and display your score..

Tips

  • To submit a parameter through a form without displaying the corresponding input, you can use a hidden input field <input type="hidden">!

  • Remember: for the forms to work you will need to remove the following line :

  protect_from_forgery with: :exception

In the app/controllers/application_controller.rb file. This will be explained in more details during the next days, but you can learn more about it here.

Extra (optional)

Everytime a new HTTP request hits your Rails app, it generates a new instance of the controller. Hence, you cannot store values across requests, except if you use Rails session. Rails session is persisted between all requests of the user's session.

Here you can use Rails session to keep track of the total number of games you have played, your average score and other kind of general information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published