Skip to content

NikolaM4/4-in-a-row

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

4 In A Row

Description

This code was created for university exercise for subject Programming 1. I wrote code on my own without looking at any other code on internet. It isn't most optimal and I didn't do refactoring, but I find this exercise very interesting so just wanted to share my solution. I will make this code better if I successfully finish 1st semester 😊.

How to use

This is console app, so you can create new C++ project on your machine and copy code and run it. 1st question asks you how many rows do you want to play game with. You can enter between 5 and 20 included. After that, you will need to enter coordinates X and then Y. Coordinates will work only if they represent bottom of table or there is something below them. After you succesfully enter coordinates, it will print out in console current table. '1' represents fields of 1st player, '2' represents fields of 2nd player and '0' represents empty cells. After there are 4 in a row, game will end by telling you which player won. If it is draw after all fields are fulfilled, it will print in console that there are no winners.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages