Ported over the code from the level prototype project, including the TileFactory. The main game class now creates a World, with Tiles from the TileFactory (doesn't do anything with them yet, though - the map is just drawing its "terrain" layer).
Not sure what should be passed into World's constructor now. It would be easy to give it a reference to Map, which has the tile width/height and number of tiles. This means a fake map has to be constructed in the tests (not much of a big deal).
The alternative is to extract each of the things World needs from Map and pass them in in the constructor directly.
Comments on a postcard.
Not sure what should be passed into World's constructor now. It would be easy to give it a reference to Map, which has the tile width/height and number of tiles. This means a fake map has to be constructed in the tests (not much of a big deal).
The alternative is to extract each of the things World needs from Map and pass them in in the constructor directly.
Comments on a postcard.

No comments:
Post a Comment