Example #1
0
File: main.go Project: 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("                                                "),
Example #2
0
File: main.go Project: 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("                                        "),