Online backgammon client (FIBS)
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
744 B

package main
import (
"log"
"code.rocketnine.space/tslocum/boxcars/game"
"github.com/hajimehoshi/ebiten/v2"
)
const (
screenWidth = 1024
screenHeight = 768
)
func main() {
ebiten.SetWindowTitle("Boxcars")
ebiten.SetWindowSize(screenWidth, screenHeight)
ebiten.SetWindowResizable(true)
ebiten.SetMaxTPS(144) // TODO tune
ebiten.SetRunnableOnUnfocused(true) // Note - this currently does nothing in ebiten
//ebiten.SetWindowClosingHandled(true) TODO implement
fullscreenWidth, fullscreenHeight := ebiten.ScreenSizeInFullscreen()
if fullscreenWidth <= screenWidth || fullscreenHeight <= screenHeight {
ebiten.SetFullscreen(true)
}
if err := ebiten.RunGame(game.NewGame()); err != nil {
log.Fatal(err)
}
}