middle of the re-work

This commit is contained in:
Beric Bearnson
2024-09-26 19:49:59 -06:00
parent e31dbef6ef
commit f2d488ef51
15 changed files with 1347 additions and 754 deletions
+9 -1
View File
@@ -1,6 +1,8 @@
package pong
type GameState struct {
Message string
Winner string
Score map[string]int
Player1 Player
Player2 Player
@@ -16,10 +18,16 @@ type Player struct {
client GameClient
Pos Vector
Size Vector
Speed float32
}
type Ball struct {
Pos Vector
Vel Vector
}
type StateUpdate struct {
// The field to update on the state object dot separated
// I.e Player1.Speed = the speed field on Player1
FieldPath string
Value []byte
}