Opened 14 years ago

Closed 13 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


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)

pairs-multiple-board-sizes.diff (14.9 KB ) - added by adams 14 years ago.
Patch to add support for variable board sizes

Download all attachments as: .zip

Change History (7)

comment:1 by adams, 14 years ago

Keywords: gsoc2010 added


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

comment:2 by adams, 14 years ago

Cc: adamd.smith@… added

comment:3 by stippi, 14 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 adams, 14 years ago


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 adams, 14 years ago

Patch to add support for variable board sizes

comment:5 by stippi, 14 years ago

Owner: changed from nobody to stippi
Status: newin-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?

comment:6 by mmadia, 13 years ago

Resolution: fixed
Status: in-progressclosed

Applied in hrev36032.

Note: See TracTickets for help on using tickets.