début de la mise en place du jeu (partie client uniquement).

This commit is contained in:
batche
2022-12-08 19:08:07 +01:00
parent a3aaedb1fd
commit 8d640ae4ab
81 changed files with 2876 additions and 2 deletions

47
JEU2/src/server/enums.ts Normal file
View File

@@ -0,0 +1,47 @@
enum EventTypes {
// Class Implemented
gameUpdate = 1,
scoreUpdate,
matchEnd,
assignId,
matchmakingComplete,
// Generic
matchmakingInProgress,
matchStart,
matchNewRound, // unused
matchPause, // unused
matchResume, // unused
// Client
clientAnnounce,
clientPlayerReady,
clientInput,
}
enum InputEnum {
noInput = 0,
up = 1,
down,
}
enum PlayerSide {
left = 1,
right
}
enum ClientRole {
player = 1,
spectator
}
enum MatchOptions {
// binary flags, can be mixed
noOption = 0b0,
multiBalls = 1 << 0,
movingWalls = 1 << 1
}
export {EventTypes, InputEnum, PlayerSide, ClientRole, MatchOptions}