reset method
Implementation
void reset() {
socket = io.io(
'http://192.168.0.249:4001',
// 'http://reign-chess.duckdns.org:4001/',
OptionBuilder()
.setTransports(['websocket'])
.setExtraHeaders({'token': UserData().token})
.enableForceNew()
.build());
room = "-1";
pendingMovements = [];
spectatorMode = false;
iAmWhite = false;
timer = 300;
type = "";
player1 = "";
player2 = "";
}