I finished working on the deck today, however I only consider it to be an alpha version of how things should work.
You can drop stuff into it, and a menu pops up asking you to input wether to place at top, bottom, or at a specified index (a window shows up and is modal).
You can double click to get the options for the deck (peek/take/shuffle) and a "restore" function, which for now just sets the display to PeekTop (or a blank square) if the deck is empty.
I still have to revise the code and make it cleaner, and figure out why DeckCanvas implements Deck<GameComponent> and use that, instead of calling basicDeck.METHOD.
Also, I had a vision in the shower today to make the Peek options bring up a new window, which will get rid of the "restore" option. However, this would require that I create a new canvas with the same game component, since GWT doesn't like having 2 canvases with the same child :(
But I'll work on that tonight and mess around with it for a bit, and see if that's how I like it.
I also want to abstract a bunch of stuff within DeckCanvas so the file isn't 500 lines long...
SO I gotta refactor(refactor(refactor(code)));
No comments:
Post a Comment