NEUOJ-Game

2017-02-23  本文已影响0人  onionwyl

Game

数据格式

{
   "map":[
       [0,0,0,0,0,0,0,1],
       [0,1,0,0,0,0,0,1],
       [0,0,3,0,0,0,0,1],
       [0,0,0,0,0,0,0,1]
   ],
   "player_count": 4,
   "player_id": [2013, 2124, 1084, 11],
   "player_pos": [
       [1,2],
       [3,4],
       [10, 0],
       [9, 8]
   ]
}
{
    "round": 1,
    "player_count": 4,
    "player_id": [2013, 2124, 1084, 11],
    "player_action": [0,1,2,3],
    "item_count": 2,
    "item_properties": [
        [
            "type": "bomb",
            "data": [
                "pos": [1,2],
                "action": 0,
                "range": 11
            ]
        ],
        [
            "type": 2,
            "data": [
                "pos": [1,2],
                "action": 0,
            ]
        ]
    ],
    "dead":{
        [
            "player_id": 1,
            "reason": -10001
        ],
        [
            "player_id": 2,
            "reason": -10003
        ]
    }
}

程序模块

  1. Runner(用来运行游戏规则的东西)
  2. Gamer(用户的程序)
  3. Guarder(守护进程)
上一篇 下一篇

猜你喜欢

热点阅读