Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.js #45

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Client.js #45

wants to merge 45 commits into from

Conversation

PartyLich
Copy link

Javascript client

Created a basic javascript client.

  • Uses jQuery and require.js libraries
  • Logins, creation, game selection, and map drawing should all work (in chromium at least).
  • the ServerAPI functions I've tested were tested using local .json files (not currently included in the repo), because the test server doesn't quite respond to everything I wanted to test.
  • There's some client templating I plan on doing in the very near future.

I'm new to github and forking and whatnot, so if I've got something mixed up, please let me know. Same goes for style - the other code I read is all in c#, so there are a few differences. It's clearly not a complete solution, but it's a start.

login:
load previous players from localStorage
create player
login should work but is presenty disabled
Games:
getopengames as advertised.
create a new game.
joinGame. Might have a bug.
Maps:
getmap from server as advertised
draw map on canvas.
Enabled login, removed superfluous comments, reorganized a few lines.
Added AMD wrapper so we can use these with require.js
Started adding in templating using JsRender.
@shiftkey
Copy link
Member

Apologies for missing this initially, I'm very interested in how this turned out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants