Cardshifter / HTML-Client

HTML/CSS/JS-based client for Cardshifter
http://cardshifter.zomis.net
Apache License 2.0
13 stars 5 forks source link

Listen for attack actions in GameBoard #157

Open Phrancis opened 6 years ago

Phrancis commented 6 years ago

While a game is being played, the game servers sends message such as the one below to signal that an action has taken place.

{
  "command":"use",
  "requestId":0,
  "id":61,
  "action":"Attack",
  "gameId":11,
  "targets":[‌​96],
  "performer":44
}

Having a listener for these messages would allow us to make a more dynamic user interface, for example animations, or a more human-friendly way to display actions as text in a chat-style dialog.