Source File: curse-you-go-rogue/01_the_screen/game.go

package main

import (
  "os"
)

func NewGame(width int, height int) (*Game) {
  var game Game

  game.Width = width
  game.Height = height
  game.Enemies = make(map[Position]*Enemy)
  game.Level = make(Map, height, height)
  game.Player = Enemy{20, Position{1,1}, 4}

  return &game
}

func (game *Game) Exit() {
  if RENDER {
    game.Screen.Fini()
  }

  os.Exit(0)
}