start game logic and pong physics

This commit is contained in:
Beric Bearnson
2024-08-26 10:02:05 -06:00
parent b3df666196
commit e31dbef6ef
11 changed files with 591 additions and 206 deletions
+25
View File
@@ -0,0 +1,25 @@
package pong
type GameState struct {
Score map[string]int
Player1 Player
Player2 Player
Ball Ball
}
type Vector struct {
X float32
Y float32
}
type Player struct {
client GameClient
Pos Vector
Size Vector
Speed float32
}
type Ball struct {
Pos Vector
Vel Vector
}