🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Mah-Jongg theories anyone?
Hi Gang, this is kind of my first post, and I''ll admit to not doing alot of lurking before, so don''t hurt me to much if this isn''t the correct place or way of doing this. (thanks)
Im looking to do a Mah-jongg/Shanghai title, and have about 3 different ways of keeping track of how the tile system should work. From a 3D array that keeps track the the type/coordinates/Hight on Pile, to just having having a table that points to EVERY possible location of a Tile, and know''s the number of the tile to either side or above it.
Anyone have a simpler way, or a better way. Im sure there''s a ton, and I could get the above 2 to work, but I thought I''d ask and see if anyone has any better suggestions. With so many versions out.. Im sure someone here''s done it.
Thanks for your time.
Cygor
Well, off the top my head you can create a coordinate system, like you would use in your three dimensional array idea. Then enter your tiles in a hash table using the coordinates of the tile to hash properly. Then if you want to determin what tile is next to a given tile, you can create the appropriate hash number and see if a tile exists there.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement