Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i just want to know if anybody have any idea about how to make an algorithm for the domino game, I just want to put the pieces on the table, But i don't know how

Somebody can help me?
Posted
Updated 21-May-11 20:02pm
v2
Comments
Manfred Rudolf Bihy 22-May-11 3:25am    
What exactly are your difficulties?
SOLR@C 22-May-11 21:27pm    
ok because i see in this game when you reach the end of the table you need go up or down the and go in contrary sense. i was thinking in a recursive method who checks if the player went for right or left(increase or decrease position into an array) something like that but im looking more ideas
tell me
thanks

1 solution

Matching numbers need to face each other so a domino with 3:2 must be matched with another that has 2:?. You could start by creating some sets that contain each player's dominoes. Then as each player takes a turn select the best fit domino to be put on the table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900