I could use help with a few parts of a project
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
The game “Linc-O” bears a legally non-actionable resemblance to the game Plinko. In Linc-O, a player chooses how many rows and columns the board will contain, as well as the maximum number of board cells that will be occupied by deflectors. After these choices are made, a random number of deflectors (between 1 and the maximum specified by the user) are randomly placed at positions in the board. Associated with each deflector is a number that determines how much the deflector will affect the horizontal velocity of a piece that is dropped into the top of the board. Positive values will deflect the piece to the right, while negative values will deflect the piece to the left. When the player begins to play Linc-O, they will select a column to drop their piece into. The piece will begin falling vertically (and continue to fall vertically, unless it encounters a deflector, or multiple deflectors). If the piece encounters a deflector, its velocity will be affected in such a way that it will move ±i columns to the left/right (depending on the value of the deflector) for each row that it falls vertically. The piece will bounce off of walls, if its velocity carries it into one, until it comes to rest at the bottom of the board. The piece is removed from the board before the next piece is dropped. The goal of Linc-O is to determine the position and value of each deflector in the board. Before each drop, the user is allowed to guess the locations and values of the deflectors. They complete the game when all deflector locations/values are determined.
The parts I am having trouble with are: giving the pegs a random x deflection value, placing the pegs randomly on the board, and the piece reacting with the sides of the board.
UPDATE: I have the pegs placed randomly.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Strategy & Logic dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!