Giter Site home page Giter Site logo

neonsy / csharp-gameoflife Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 94.89 MB

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

License: MIT License

C# 100.00%
console-application console-game csharp dotnetcore gameoflife-cli game-of-life gameoflife

csharp-gameoflife's Introduction

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

csharp-gameoflife's People

Contributors

neonsy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.