add logs (#62)
This commit is contained in:
parent
3f8a65de50
commit
359694f74c
3 changed files with 7 additions and 1 deletions
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
|
|
@ -5,7 +5,9 @@ updates:
|
|||
schedule:
|
||||
interval: weekly
|
||||
- package-ecosystem: cargo
|
||||
directory: "/"
|
||||
directories:
|
||||
- client
|
||||
- server
|
||||
schedule:
|
||||
interval: daily
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export class Control extends EventEmitter {
|
|||
}
|
||||
|
||||
send_ready() {
|
||||
console.log("Sending ready");
|
||||
this.emit("ready");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ async fn main() {
|
|||
#[wasm_bindgen]
|
||||
impl RemoteClient {
|
||||
pub async fn start() {
|
||||
log("starting client");
|
||||
panic::set_hook(Box::new(console_error_panic_hook::hook));
|
||||
let control = get_control();
|
||||
let features = Features {
|
||||
|
|
@ -79,9 +80,11 @@ impl RemoteClient {
|
|||
}
|
||||
|
||||
pub async fn run(&mut self) {
|
||||
log("running client");
|
||||
loop {
|
||||
let p = self.control.receive_player_index().as_f64();
|
||||
if let Some(p) = p {
|
||||
log(&format!("received player index: {}", p));
|
||||
self.state.control_player = Some(p as usize);
|
||||
self.state.show_player = p as usize;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue