Fast, battle tested, Yaniv Engine with fully REST API
POST /games
{
"name": String,
"params": {
"max_score": Number,
"yaniv_at": Number
}
}
=> GET /game/:name
DELETE /game/:name
GET /game/:name
{
"name": String,
"params": {
"max_score": Number,
"yaniv_at": Number
},
"players": [{
"hand": {
"cards": [Number],
"size": Number,
"value": Number
},
"name": String,
"score": Number,
"state": {
"asaf": Boolean,
"loser": Boolean,
"playing": Boolean,
"ready": Boolean,
"yaniv": Boolean
}
}],
"round": Number,
"stack": {
"cards": [Number]
},
"state": {
"ended": Boolean,
"started": Boolean,
"yaniv_battle": Boolean
}
}
GET /games
[{
"name": String,
"params": {
"max_score": Number,
"yaniv_at": Number
},
"players": [{
"name": String
}],
"round": Number,
"state": {
"ended": Boolean,
"started": Boolean
}
}]
POST /game/:name/players
{
"name": String
}
=> GET /game/:name
DELETE /game/:name/player/:name
=> GET /game/:name
PUT /game/:name/player/:name
{
"ready": Boolean
}
=> GET /game/:name
POST /game/:name/player/:name/action/asaf
Boolean
=> GET /game/:name
POST /game/:name/player/:name/action/takecard
{
"discard": [Number],
"take": Number
}
=> GET /game/:name
POST /game/:name/player/:name/action/yaniv
=> GET /game/:name