Skip to content

Instantly share code, notes, and snippets.

Created June 9, 2015 14:22
Show Gist options
  • Save anonymous/a907ccbe1cd767f71cb6 to your computer and use it in GitHub Desktop.
Save anonymous/a907ccbe1cd767f71cb6 to your computer and use it in GitHub Desktop.
get '/' do
game = Game.new
@point = game.point
JSON.parse(File.read("data.json"))
erb :index
end
post '/' do
game = Game.new
game.point!(params[:marque].gsub(/oueur /, '').to_sym)
@point = game.point
File.write("data.json", game.point.to_json)
erb :index
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment