From e321f33a69b43daf71d9391f85ebf2ffc6d51636 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 28 Sep 2020 23:09:16 -0600 Subject: [PATCH] Add basic command handlers for all current events --- src/events/ChancellorNomination.ts | 4 ++++ src/events/ChancellorPolicy.ts | 4 ++++ src/events/JoinGame.ts | 5 +++++ src/events/PresidentPolicies.ts | 4 ++++ src/events/StartGame.ts | 4 ++++ src/events/VetoConfirm.ts | 4 ++++ src/events/VetoRequest.ts | 4 ++++ src/events/Vote.ts | 4 ++++ src/events/special/Execution/ExecutePlayer.ts | 4 ++++ src/events/special/ExecutiveConfirmation.ts | 4 ++++ .../special/InvestigateLoyalty/InvestigateAffiliation.ts | 4 ++++ src/events/special/SpecialElection/NextPresident.ts | 4 ++++ 12 files changed, 49 insertions(+) diff --git a/src/events/ChancellorNomination.ts b/src/events/ChancellorNomination.ts index e69de29..2ee4996 100644 --- a/src/events/ChancellorNomination.ts +++ b/src/events/ChancellorNomination.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const ChancellorNomination = (socket: Socket, data: any) => { + console.log(`ChancellorNomination event`); +}; \ No newline at end of file diff --git a/src/events/ChancellorPolicy.ts b/src/events/ChancellorPolicy.ts index e69de29..2c7150b 100644 --- a/src/events/ChancellorPolicy.ts +++ b/src/events/ChancellorPolicy.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const ChancellorPolicy = (socket: Socket, data: any) => { + console.log(`Chancellor policy`); +}; \ No newline at end of file diff --git a/src/events/JoinGame.ts b/src/events/JoinGame.ts index e69de29..9e82d0e 100644 --- a/src/events/JoinGame.ts +++ b/src/events/JoinGame.ts @@ -0,0 +1,5 @@ +import { Socket } from 'socket.io'; +export const JoinGame = (socket: Socket, data: JoinGame) => { + console.log(`User: ${data.username} (${data.game_code})`); + console.log(`Joining a game`); +}; \ No newline at end of file diff --git a/src/events/PresidentPolicies.ts b/src/events/PresidentPolicies.ts index e69de29..f0240e7 100644 --- a/src/events/PresidentPolicies.ts +++ b/src/events/PresidentPolicies.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const PresidentPolicies = (socket: Socket, data: any) => { + console.log(`Received Presidential policies`); +}; \ No newline at end of file diff --git a/src/events/StartGame.ts b/src/events/StartGame.ts index e69de29..e03eca9 100644 --- a/src/events/StartGame.ts +++ b/src/events/StartGame.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const StartGame = (socket: Socket, data: any) => { + console.log(`Game starting`); +}; \ No newline at end of file diff --git a/src/events/VetoConfirm.ts b/src/events/VetoConfirm.ts index e69de29..b012b79 100644 --- a/src/events/VetoConfirm.ts +++ b/src/events/VetoConfirm.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const VetoConfirm = (socket: Socket, data: any) => { + console.log(`President's veto confirmation`); +}; \ No newline at end of file diff --git a/src/events/VetoRequest.ts b/src/events/VetoRequest.ts index e69de29..58ccb7f 100644 --- a/src/events/VetoRequest.ts +++ b/src/events/VetoRequest.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const VetoRequest = (socket: Socket, data: any) => { + console.log(`Chancellor requesting veto`); +}; \ No newline at end of file diff --git a/src/events/Vote.ts b/src/events/Vote.ts index e69de29..b7f61fb 100644 --- a/src/events/Vote.ts +++ b/src/events/Vote.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const Vote = (socket: Socket, data: any) => { + console.log(`Vote received`); +}; \ No newline at end of file diff --git a/src/events/special/Execution/ExecutePlayer.ts b/src/events/special/Execution/ExecutePlayer.ts index e69de29..7670c27 100644 --- a/src/events/special/Execution/ExecutePlayer.ts +++ b/src/events/special/Execution/ExecutePlayer.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const ExecutePlayer = (socket: Socket, data: any) => { + console.log(`Killing a player`); +}; \ No newline at end of file diff --git a/src/events/special/ExecutiveConfirmation.ts b/src/events/special/ExecutiveConfirmation.ts index e69de29..395eec2 100644 --- a/src/events/special/ExecutiveConfirmation.ts +++ b/src/events/special/ExecutiveConfirmation.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const ExecutiveConfirmation = (socket: Socket, data: any) => { + console.log(`Just a plain ole confirmation`); +}; \ No newline at end of file diff --git a/src/events/special/InvestigateLoyalty/InvestigateAffiliation.ts b/src/events/special/InvestigateLoyalty/InvestigateAffiliation.ts index e69de29..a6c8900 100644 --- a/src/events/special/InvestigateLoyalty/InvestigateAffiliation.ts +++ b/src/events/special/InvestigateLoyalty/InvestigateAffiliation.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const InvestigateAffiliation = (socket: Socket, data: any) => { + console.log(`Investigating a player`); +}; \ No newline at end of file diff --git a/src/events/special/SpecialElection/NextPresident.ts b/src/events/special/SpecialElection/NextPresident.ts index e69de29..337485b 100644 --- a/src/events/special/SpecialElection/NextPresident.ts +++ b/src/events/special/SpecialElection/NextPresident.ts @@ -0,0 +1,4 @@ +import { Socket } from 'socket.io'; +export const NextPresident = (socket: Socket, data: any) => { + console.log(`Choosing the Next President`); +}; \ No newline at end of file