The Markov Chain project consists of 3 classes: MarkovChain, Matrix and Vector. The program revolves around the concept of polymorphism, with Matrix and Vector being subclasses of MarkovChain. The Matrix class creates a matrix, while the Vector class is a subclass of Matrix responsible for gathering a vector from that matrix. The MarkovChain class creates a new matrix following the Markov Chain principle, multiplying the matrix by the probability vector for a fixed amount of times. How the matrix is multiplied is dependent on the two Multiply methods, which overload one another depending on which parameter is sent through.
As per the title, Cribbage Counting emulates a game of cribbage using linked lists. Each linked list is a set of cards, where each node being of the type Card. The class Counter tallies the score based on the possible combinations from the set of cards you have (generated by the class Set). These combinations are determined based on the suit and label of each node. Power Set is a class that generates all the possible card combinations from the total of 5 cards contained in each set.
Dungeons and Dragons simulates a small game of DnD using queues. The program navigates through a generated board game space with hexagonal spaces. The objective of the game is to find the hexagonal space containing the exit to the dungeon, whilst finding the most optimal path from the entrance to the exit. Each hexagon can fit one of four categories: empty, wall, dragon and the exit itself. The walls are non-traversable, and the dragon space restricts the player from accessing neighbouring hexagons, hence the program must find the shortest path to the exit while avoiding walls and dragon controlled hexagons. To do this, a doubly-linked list of hexagons are formed then added to a queue. As it runs, it removes hexagons with the lowest priority from the queue (the hexagons at the top of the queue) until it finally creates the path with the lowest priority hexagons.
The File and Folders project revolves around file navigation and tree data structures. The NLNode class forms the different nodes of the tree, using the iterator class to generate a interactive list of the node's children. In this case, a file will be considered a leaf node, while a directory will become a parent node with its children. The FileStructure class uses recursive methods to generate tree of the nodes, each time a new node is found, the method is recalled with that node being passes as the parameter. By the end, the entire file structure will be complete and navegable by the user.