4fe0293dec311c0b5d2d3569c791f20d41922795
[sketchy-heroes.git] / src / public / app / game.ts
1 import { Api } from './api';
2 import { playerOverview } from './sections/overview';
3 import $ from 'jquery';
4
5 const api = new Api('http://localhost:9090');
6
7 api.on('player', playerOverview);
8
9 async function main() {
10   await api.login('xangelo2', 'test');
11 }
12
13
14 $('#explore-action').on('click', async e => {
15   e.preventDefault();
16   e.stopPropagation();
17
18   await api.move();
19 });
20
21 main();