Drawing a gameboard like checkers in Android
I want to design a gameboard such as Checkers (but with the possibility of having different board tiles.
Now, OO logic and reason tell me I should have a 'tile' class which I can draw, and I draw x by y number of these on one canvas.
My question is what is the best performant way to draw suc开发者_如何学编程h a board? Is it reasonable to do it the way I mentioned above and re-draw on changes? Is it better to have an image as my background and 'simulate' a board by snapping to where the tile would be?
Thanks!
I think you might benefit from checking out the snake game code for android. It has a very straight forward way of using tiles to make a game area.
精彩评论