2023-11-07 21:47:32 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
2023-11-12 12:55:09 +01:00
|
|
|
// Create a channel to push key-presses through
|
|
|
|
keypresses := make(chan int)
|
2023-11-12 14:51:06 +01:00
|
|
|
gamestate := make(chan int)
|
2023-11-12 12:55:09 +01:00
|
|
|
|
2023-11-07 21:47:32 +01:00
|
|
|
screen, style, err := initilize()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalln("Initlization error: ", err)
|
|
|
|
}
|
2023-11-12 14:51:06 +01:00
|
|
|
defer quit(screen)
|
2023-11-07 21:47:32 +01:00
|
|
|
|
2023-11-12 14:51:06 +01:00
|
|
|
go gameDirector(screen, style, keypresses, gamestate)
|
|
|
|
keyboardProcessor(screen, keypresses, gamestate)
|
2023-11-07 21:47:32 +01:00
|
|
|
|
|
|
|
}
|