15: Player movement messages

What if each player controlled a character that they could move around the screen, as well as the chat interface?

Use your knowledge of key-value views to track the x/y coordinates of each player. Choose a message type for these messages; we suggest

{
  type: 'player-movement',
  x: Number,
  y: Number
}

Exercise

  1. Write a function that take an X and Y coordinate publishes messages of this type to your local feed.
  2. Try writing a kappa-view-kv view that lets you get a player's most recent x/y coordinate. (HINT: use their feed.key.toString('hex') as a key!)

Once you solve this exercise continue to exercise 16