HnefaVerse ========== The hnefaverse server will have as small api for clients to use. The api will be in a method-group called "hnefas-api" and it will have the following methods: * login("username") (enter lobby) * getgames() (tell the server we want a list of existing games) * join("gameid") (join, or will create new game if non-existant gameid) * leave("gameid") leave the current/designated game * cursor("gameid", "action") left, right, up, down, pick, drop * perhaps some methods for simple chatting, if not using the chat protocol - probably just say("gameid","msg"), where "gameid" can be empty for lobby chatting The client will have also a small api, mostly for validation messages from the server. This method-group should be called "hnefac-api" * ack("yesno") * turn("who") telling whose turn it is now * games("gameids") list of games * joined("gameid") game entered * left("gameid") game left * possible chat methods The main control in a game is the cursor() method. Through this the user can control the cursor and what it does (pick up piece, move it, drop it). The game logic is of course also on the server side. Through this the cursor object will be manipulated by authorisation of the server, as well as the piece locations. So, in a game, the user client will issue cursor(123, MOVE_RIGHT), and the server will validate the action, and update the actual cursor object location. Next it could be a cursor(123, PICK), and the server will internally understand that an attempt to pick up a piece at the cursor location has been done. etc.