Ejemplo n.º 1
0
Archivo: main.go Proyecto: uriel/rog
package main

import (
	"github.com/ajhager/rog"
	"image"
	"runtime"
)

var (
	width  = 48
	height = 32

	wall   = rog.Hex(0xffb4b4)
	floorc = rog.Hex(0x804646)
	black  = rog.Hex(0x000000)
	white  = rog.Hex(0xffffff)
	lgrey  = rog.Hex(0xc8c8c8)
	dgrey  = rog.Hex(0x1e1e1e)

	pmap  = rog.NewMap(width, height)
	path  []image.Point
	x     = 0
	y     = 0
	first = true
	stats runtime.MemStats

	tmap = [][]rune{
		[]rune("                                                "),
		[]rune("                                                "),
		[]rune("                                                "),
		[]rune("                                                "),
Ejemplo n.º 2
0
Archivo: main.go Proyecto: ajhager/rog
	"runtime"
)

type Level struct {
	data [][]rune
}

func (l *Level) MoveBlocked(x, y int) bool {
	return l.data[y][x] == '#'
}

var (
	width  = 40
	height = 20

	wall   = rog.Hex(0xffbb99)
	floorc = rog.Hex(0x885040)
	lgrey  = rog.Hex(0xc8c8c8)
	dgrey  = rog.Hex(0x1e1e1e)

	pmap  = rog.NewMap(width, height)
	path  []image.Point
	x     = 0
	y     = 0
	first = true
	stats runtime.MemStats

	tmap = [][]rune{
		[]rune("                                        "),
		[]rune("                                        "),
		[]rune("                                        "),