Skip to content

A GameOfLife Game Written In .Net7 As A C# Console Application

License

Notifications You must be signed in to change notification settings

DrNeonsy/CSharp-GameOfLife

Repository files navigation

GameOfLife Console Game 🎮

CSharp Console Dotnet Windows

Description

This project is an implementation of John Conway's Game of Life as a console application written in C#. This implementation of the Game of Life is interactive and allows the user to control various aspects of the game, including the ability to start and stop generations, toggle the state of individual cells, change the color of the game interface, control the background music, and more.

Idea 💡

The idea for this project came about after a classroom exercise where we were tasked with creating the Game of Life as a graphical user interface (GUI) application. We wanted to take this a step further by leveraging our knowledge of Object-Oriented Programming (OOP) principles in C#. We decided to recreate the Game of Life, this time as a console application, to practice a more logical approach to programming, improve our code organization skills, and deepen our understanding of OOP in C#, but also OOP in general. This was also the first project my partner and I worked on together, which added an extra layer of collaboration and communication to our learning journey 😄 The next project we will work on will be in Java.

How To Use ℹ️

Upon launching the application, you'll be presented with a menu that allows you to customize various aspects of the game, such as the color of the game interface and the background music. You can also access instructions on how to play the game.

Once in the game, you'll be able to use the arrow keys to navigate through the game field and the spacebar to change the state of the cells. Pressing the Enter key will start the next generation. If you wish to return to the main menu, you can press the Escape key.

Note 📝

Because there were a lot of other things we had to do, we didn't have the time to optimize performance, so we decided to keep on clearing the console and redrawing the game per action. This is not the best way to do it, but it works. I may optimize it in the far-off future, but who knows 😅

Also, the auto maximization of the window and the max width and height are based on the monitor we were using, which was a curved 1920x1080 (unknown size) one. So the maximum width might not work for you, being either larger or smaller 🖥️

Images

Start

Start

Menu

Menu

How To Play

How To Play - Rules

How To Play - Controls

Music Selection

Song Selection

Color Selection

Color Selection

Game

Game

Game Result

Releases

No releases published

Languages