Restructure following https://github.com/fogleman/nes ideas
This commit is contained in:
17
gb/console.go
Normal file
17
gb/console.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package gb
|
||||
|
||||
type Console struct {
|
||||
Cartridge *Cartridge
|
||||
}
|
||||
|
||||
func NewConsole(path string) (*Console, error) {
|
||||
cartridge := InsertCartridge(path)
|
||||
|
||||
console := Console{cartridge}
|
||||
|
||||
return &console, nil
|
||||
}
|
||||
|
||||
func (console *Console) Update(dt uint64) {
|
||||
console.StepSeconds(dt)
|
||||
}
|
||||
Reference in New Issue
Block a user