theravel/Poker-face — Issue #1: Transport protocol implimentation
Author: L00kian
Created: 2011-11-18 07:03:20+00:00
State: open

```javascript
*** Client requests with feedback ***

1. Registration

Request:
{
action: "registration",
login: "login",
pass: "pass"
}

---

2. Authentification
{
action: "autentification",
login: "login",
pass: "pass"
}

---

3. Get Games List

Request:
{
action: "getList",
hasFreePlaceOnly: true,
limit: 40
}

Response:
[
{
id: 42,
name: "foo",
playersCount: 42,
playersActual: 42
},
...
]

---

4. Sit at the table
{
action: "sit",
id: 42
}

---

5. Stand up
{
action: "stand",
id: 42
}

---

6. Bet
{
action: "bet",
id: 42,
money: 100500,
isAllIn: true
}

---

7. Fold
{
id: 42
}

---

8. Check
{
id: 42
}

---

9. Open
{
id: 42,
decision: true
}

---

*** Asynchronous server messages ***

1. Game
{
id: 42,
players: ["Ivanov", "Petrov", "Sidorov"],
stage: 1,
bets:	[
{
"Ivanov" : 42,
...
},
...
]
previousTurn:	{
login: "Ivanov",
action: "call",
bet: 42
}
currentPlayer: "Petrov",
buttonPlayer: "Ivanov",
cards:	[
{
value: 2,
color: "hearts"
},
...
]
yourCards:	[
{
value: 2,
color: "hearts"
},
{
value: 3,
color: "diamonds"
}
]
gameOver: false
}
```