Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
help programming the game Cluedo.
I have to program the game cluedo for a project; my problem is in in the phase of selecting the 3 cards that will be the killer, the weapon and the place. Then group all the cards and give them randomly the the players (between 3-6 selected by the user).
The idea I have is to create 3 sets (1 of each kind) so I can select randomly 1 of each set to determine the killer, the weapon and the place.
Next, create a 4th set with the union of the other 3 ( giving the idea of mixing all the cards), exclude the 3 elements previously chosen and do a loop assigning each card to the hand of the player(I think the hand should be an array and this must be done evenly).
Note that the assignment of the cards must be without repetitions , so I guess I have the exclude the chosen card in the loop from the 4th set each round).
Also there are 6 persons cards, 6 arms and 9 places.
Could someone give me insight of how to write this section of the game in Pascal?.