Programming – Week 1

This weeks assignments was a bit to easy because I’ve been programming in C# before. I decided to give myself an assignment, Tic Tac Toe.

By creating this game i learned new syntax such as std::string and system(”cls”). I also learned how to create a two dimensional array. In C# you could create one using the datatype and then [ ] for normal array and [ , ] for a two dimensional.
I learned that in C++ you create arrays by typing the datatype and then [ ] for normal array and [ ][ ] for a two dimensional.

My version of Tic Tac Toe works by waiting for player input. The player enters a row and a column and the symbol either X or O depending on player 1 or player 2 is placed on that spot. I’m using a while loop in order to clear the console screen and redrawn the playfield each time a player places a symbol.


Lämna en kommentar