MultiplayerMinesweeper/client/scripts/net/status.js

18 lines
394 B
JavaScript
Raw Normal View History

import {updateConnectionStatus} from "../interface/game/connection.js"
var SERVER_CONNECTION = "disconnected"
export function get() {
return SERVER_CONNECTION;
}
export function connected() {
SERVER_CONNECTION = "connected";
updateConnectionStatus(SERVER_CONNECTION);
}
export function disconnected() {
SERVER_CONNECTION = "disconnected";
updateConnectionStatus(SERVER_CONNECTION);
}