Skip to content

Make everything interfaces #6

@eaburns

Description

@eaburns

Window should be an interface instead of a concrete type. Likewise with Canvas. This will make the package testable. To accomplish this, events and key and mouse constants need to be made more generic so that they aren't exposing any of their SDL heritage; a Mixer interface type should be added, and the PlayXXX functions should be added as its methods. Basically, the ui package itself should be completely independent of the implementation.

Finally, the current SDL implementations of these interfaces should be moved to an sdl/ directory that simply exports functions for making a Window and Mixer.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions