elenadj7 / DiamondCircle

A simple simulation representing a concurrent game of moving pawns across a matrix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Diamond circle

Each player has a unique name and four figures of the same color, each characterized by color and movement type. There are three types of figures: regular, hovering, and super-fast. Each figure can be red, green, blue, or yellow. Regular and hovering figures move a designated number of fields, while super-fast figures move twice as many fields as the designated number. Regular and super-fast figures can fall into a hole, while hovering figures remain suspended above the hole. At the beginning of the game, each player receives four randomly selected figures of the same color. In addition to the figures used by the players, there is also a "ghost" figure - it begins its movement when the first player does, and moves along a "background" path, placing bonus fields - diamonds - along the path. A random number of diamonds are placed at random positions within a range of 2 to the dimension of the matrix. Placements occur every 5 seconds and continue until the end of the game. When a figure encounters a diamond, it "picks it up", and subsequently, during its movement, the number of fields it moves increases by the number of diamonds it has collected. The order of players is determined randomly. A move is defined as moving a game figure a certain number of fields from one position to another. When making a move, care is taken to ensure that if the field is taken the figure is placed on the next available. Moving from one field to another takes one second. The method of movement is determined by drawing a card randomly from a deck of 52 cards. There are regular cards and special cards. A regular card consists of an image and the number of spaces that the piece moves. A special card only has an image. When a special card is drawn, n holes are created on the path. These holes are black. The card is returned to the deck after it is drawn. If a figure is on a hole and it is not a floating figure, it is lost. When a figure is lost, if the player has other figures left, they start again from the beginning. The game ends when all players have no more figures left - that is, each player's figures have reached the finish line or all figures have been lost. A player is considered a thread.

Below are photos of the user interface:

Screenshot 2023-04-12 134510

Screenshot 2023-04-12 134615

Screenshot 2023-04-12 134654

When you click on the name of a figure from the list of figures, a window appears showing the path that the figure took:

Screenshot 2023-04-12 134741

Screenshot 2023-04-12 134818

When you click on the game you want, it will open in the default .txt editor that is configured on that computer:

Screenshot 2023-04-12 134848

About

A simple simulation representing a concurrent game of moving pawns across a matrix


Languages

Language:Java 78.9%Language:Roff 21.1%