reorganize
This commit is contained in:
@ -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
|
||||
}
|
@ -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) {
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package types
|
||||
|
||||
type Player struct {
|
||||
Mob
|
||||
}
|
Reference in New Issue
Block a user