Posts

Showing posts from November, 2024

Scalable grid with input for 'Tic Tac Toe' - In C++

Image
For one of my assignments for my programming module, I have been given the task of creating a 'Tic Tac Toe' game in C++ with many additional improvements and features added to the base to show my range of skills and my creativity. For this program, I have created a function that will display a grid of any size, where the row length is always equal to the column length, and can take in input that will also adapt to the size of the grid. Displaying A Grid Filled With Values  This is a screenshot of the 'DisplayGrid' function. It is responsible for displaying a grid that is been filled in with what the players have inputted previously and will let the players decide their next move. Each line has been commented to explain what they do and what the next lines will be doing. In a quick summary, the function starts off by initialising a variable called 'currentColour', which will store the colour of the current player's symbol to apply to the cell. It then loops t...