Skip to content

Commit

Permalink
add logs (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger authored Oct 3, 2024
1 parent 3f8a65d commit 359694f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ updates:
schedule:
interval: weekly
- package-ecosystem: cargo
directory: "/"
directories:
- client
- server
schedule:
interval: daily

Expand Down
1 change: 1 addition & 0 deletions client/js/src/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class Control extends EventEmitter {
}

send_ready() {
console.log("Sending ready");
this.emit("ready");
}

Expand Down
3 changes: 3 additions & 0 deletions client/src/remote_client/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
Expand Down

0 comments on commit 359694f

Please sign in to comment.