Skip to content

jgabrielygalan/GameFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#GameFramework

GameFramework is a framework to easily develop turn based games

to start the server:

  • start mongo process:
$ mongod --dbpath ~/Path/to/my/db
  • launch sinatra:
$ cd bin/
$ ./launch_sinatra
  • create user
$ ruby lib/gameframework/domain/create_user.rb <user> <password>

go to localhost:10000/web/index.html in your browser

Post a move to tictactoe match:

curl -v -XPOST -d'{"id":"move", "params":{"x":0, "y":0}}' http://localhost:10000/games/TicTacToe/5511223a110d460e81000001/event\?token\=P4YtVfpwnyr9yL594eFjVwWHyhFYOuDbVrlsXoxv29vzCb5RSpyPvLUeHNpLPb8BuvQKX4ggo_OAqL7v5zKUqg

  • authenticate
$ curl -XPOST http://localhost:10000/auth?username=<name>&password=<psswd>
  • create game
$ curl -XPOST http://localhost:10000/games/TicTacToe?token=<xxx>

About

Framework to develop Turn Based Games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published