public override void loadPageData() { send(new ClientMessage("FETCHDECK", new List <string>() { GameRoomID.ToString(), DeckID.ToString() })); }
public override void clientCommandProcessor(ClientMessage message) { switch (message.Command) { case "DISCONNECTED": parent.disconnected("Connection to server was lost and a log regarding the incident was created and deposited inside 'Logs' in apps home directory.", 0); break; case "REMOTEDISCONNECT": parent.disconnected("Your account was logged in from a different location.", -1); break; case "DECKSET": loadedDataChecklist[0] = true; send(new Models.ClientMessage("GETHAND", new List <string>() { GameRoomID.ToString() })); break; case "HANDRECEIVED": InitialHand = argumentsToCards(message.stringArguments); loadedDataChecklist[1] = true; send(new Models.ClientMessage("READYTOSTART", new List <string>() { GameRoomID.ToString() })); break; case "READYTOGO": loadedDataChecklist[2] = true; break; case "YOURTURN": parent.updateGameState(true, "Mana phase"); break; case "OPPTURN": parent.updateGameState(false, "Mana phase"); break; default: break; } }
public override void gameCommandProcessor(GameMessage message) { switch (message.Command) { case "PLAYEDASMANA": processPlayedAsMana(message); break; case "SETPHASE": parent.updateGameState(false, message.stringArguments[0]); break; case "YOURTURN": parent.startTurn(); break; case "ROLLON": parent.DrawCards(message.intArguments); parent.addRunMethodEvent(new Animations.Event(parent.loadManaPhase)); break; case "YOURECEIVEDCARD": processReceivedCard(message); break; case "OPPRECEIVEDCARD": parent.processOppDrew(message); break; case "SUMMON": processSummon(message); break; case "ATTACKSAFEGUARDS": processAttackSafeguards(message); break; case "YOURGUARDSBROKE": parent.yourGuardsBroke(message.intArguments); break; case "YOUBROKEGUARD": parent.youBrokeGuard(message.intArguments); break; case "ATTACKCREATURE": processAttackCreature(message); break; case "ATTACKPLAYER": processAttackPlayer(message); break; case "BATTLE": processBattle(message); break; case "SENDTO": processSendTo(message); break; case "OPPSURRENDERED": send(new ClientMessage("CLOSEROOM", new List <string>() { GameRoomID.ToString() })); parent.loadEndGame(true); break; case "YOURDECKTOMANA": processYourDeckToMana(message); break; case "OPPSDECKTOMANA": processOppsDeckToMana(message); break; case "NEWINGAMECHATMESSAGE": parent.processNewChatMessage(message.stringArguments[0], message.intArguments[0] != 0); break; default: break; } }