Opened 15 years ago
Closed 15 years ago
#5615 closed enhancement (fixed)
Pairs is fixed at 4 tiles x 4 tiles, add support for a different game sizes (easy)
Reported by: | scottmc | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications | Version: | R1/alpha1 |
Keywords: | gsoc2010 | Cc: | adamd.smith@… |
Blocked By: | Blocking: | ||
Platform: | All |
Description
This was marked in the source code as a TODO, but creating a ticket for it so it'll be easy to follow through on. Maybe add a menu option to pick various board sizes.
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
Keywords: | gsoc2010 added |
---|
comment:2 by , 15 years ago
Cc: | added |
---|
comment:3 by , 15 years ago
Hi adams,
thanks for the patch, the implementation is adequate. Some things could be factored out into separate methods even more, like you've already started doing (for example I am sure the switch case you added in MessageReceived for switching board size will not even compile without warning). But the main issue with the patch is coding style. From the main website, you can go into the development section and the Getting Started section has a link to our coding style guide. We are pretty strict about applying it. :-) So if you read through that document and apply it to the code you added, I would be happy to apply your patch.
comment:4 by , 15 years ago
Hi,
I've updated the patch above. It should be a bit more standards-compliant now. I've also factored out the board size setting code, as you suggested.
by , 15 years ago
Attachment: | pairs-multiple-board-sizes.diff added |
---|
Patch to add support for variable board sizes
comment:5 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
Thanks for the new patch. I've done some more small coding style fixes and am ready to commit the patch, but I would like to add your copyright to some files. Can you send me your real name at superstippi at gmx dot de?
Hi,
I've hacked up Pairs a bit so that it now supports different board sizes. Right now it gives the player the choice between Beginner, Intermediate, or Expert sizes, but it'd be fairly easy to add support for custom board sizes and so on. It also always defaults to Beginner on startup; maybe some day someone could make it save settings.
Hope the code's okay - this is my first contribution to Haiku, so let me know if there are any problems.
Cheers, Adam