Skip to content

Commit 359694f

Browse files
authored
add logs (#62)
1 parent 3f8a65d commit 359694f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/dependabot.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ updates:
55
schedule:
66
interval: weekly
77
- package-ecosystem: cargo
8-
directory: "/"
8+
directories:
9+
- client
10+
- server
911
schedule:
1012
interval: daily
1113

client/js/src/control.js

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export class Control extends EventEmitter {
4040
}
4141

4242
send_ready() {
43+
console.log("Sending ready");
4344
this.emit("ready");
4445
}
4546

client/src/remote_client/bin/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ async fn main() {
6060
#[wasm_bindgen]
6161
impl RemoteClient {
6262
pub async fn start() {
63+
log("starting client");
6364
panic::set_hook(Box::new(console_error_panic_hook::hook));
6465
let control = get_control();
6566
let features = Features {
@@ -79,9 +80,11 @@ impl RemoteClient {
7980
}
8081

8182
pub async fn run(&mut self) {
83+
log("running client");
8284
loop {
8385
let p = self.control.receive_player_index().as_f64();
8486
if let Some(p) = p {
87+
log(&format!("received player index: {}", p));
8588
self.state.control_player = Some(p as usize);
8689
self.state.show_player = p as usize;
8790
}

0 commit comments

Comments
 (0)