You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
359 B

package main
import "github.com/veandco/go-sdl2/sdl"
type pos struct {
x, y float32
}
type ball struct {
pos
radius float32
dx float32
dy float32
color sdl.Color
}
type paddle struct {
pos
w float32
h float32
speed float32
score int
color sdl.Color
}
type gameState int
const (
start gameState = iota
play
pause
end
)