reorganize

This commit is contained in:
2019-11-01 18:21:27 +03:00
parent 1ac6ae4665
commit 529f5a5749
7 changed files with 56 additions and 49 deletions

View File

@ -1,21 +0,0 @@
package types
type GameState struct {
Mainfunc chan func()
Exit chan struct{}
Input chan string
RawInput chan int
FovRecompute chan struct{}
Redraw chan struct{}
Player *Player
}
// do runs f on the main thread.
func (g *GameState) Do(f func()) {
done := make(chan struct{}, 1)
g.Mainfunc <- func() {
f()
done <- struct{}{}
}
<-done
}

View File

@ -1,19 +0,0 @@
package types
type Mob struct {
*Appearance
Coords
BlocksPass bool
}
func (m *Mob) Walk(dx, dy int) {
}
func (m *Mob) Render() {
}
func (m *Mob) MoveToCoords(c Coords) {
}

View File

@ -1,5 +0,0 @@
package types
type Player struct {
Mob
}