Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Latest commit

 

History

History
92 lines (73 loc) · 1.31 KB

testExamples.md

File metadata and controls

92 lines (73 loc) · 1.31 KB

Text Examples

Events

GameCreated

{
    "gameId": 1,
    "event": {
        "type": "GameCreated",
        "player": "grimur"
    }
}

PlayerJoined

{
    "gameId": 1,
    "event": {
        "type": "PlayerJoined",
        "player": "pc"
    }
}

GameStarted

{
    "gameId": 1,
    "event": {
        "type": "GameStarted",
        "playerOne": "grimur",
        "playerTwo": "pc"
    }
}

GameEnded

{
    "gameId": 1,
    "event": {
        "type": "GameEnded",
    }
}

PlayerLeft

{
    "gameId": 1,
    "event": {
        "type": "PlayerLeft",
        "player": "pc"
    }
}

PlayerPlacedIllegalMove

{
    "gameId": 1,
    "event": {
        "type": "PlayerPlacedIllegalMove",
        "coordinates": [0,2]
    }
}

PlayerPlacedMove

{
    "gameId": 1,
    "event": {
        "type": "PlayerPlacedMove",
        "coordinates": [1, 2]
    }
}

GameDraw

{
    gameId: 1,
    "event": {
        "type": "GameDraw"
    }
}

PlayerWon

{
    gameId: 1,
    "event": {
        "type": "PlayerWonHorizontal",
        "player": "grimur"
    }
}