Skip to content

Github11200/Citrus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Citrus ๐Ÿ‹

A Tetris game written in C (Cetris -> Citrus) using just the standard library. It's meant to run in your terminal and uses ASCII and ANSI characters to display the blocks.

image

How to run

  1. Make sure you're running on either Linux or are using Windows Subsystem for Linux (WSL) because anything other than Linux is bad.
  2. Make sure you have gcc installed on Linux (you may or may not need to do this, try out step 3 first!). Good luck installing it ๐Ÿซก.
  3. Clone the repository and cd into it. Then simply type "./citrus".
  4. It should hopefully work and not die.

Customizability ๐Ÿ› ๏ธ

There isn't much you can change. If you really want to though, you can open the citrus.c file and change the HEIGHT and/or WIDTH varibles of the game. You can also change the MAIN_THREAD_SLEEP_TIME and INPUT_THREAD_SLEEP_TIME variables to change how quickly it refreshes. Try not to crash it!

Other random stuff

Why did I make this?

  1. I wanted to actually make something in C because I've only really done web development and the only time I've had to use C/C++ is in robotics and DSA.
  2. I saw a coding montage in the movie Tetris (awesome movie) and I was like, "hmm, it can't be that hard." It really isn't hard either, it just takes me a bit of time to think :).
  3. It's for my Computer Programming 11 course.

Why didn't I use any libraries?

  1. Libraries in C are weird.
  2. Web development is all about putting together like 50 different libraries, I wanted to have a go at coding something without that.
  3. Why not?

Why did I choose C?

I've always been using objects because every single other language I've programmed in has objects. Then I was like, "hmm, what if OOP is just dumb?" To test this hypothesis, and force myself to not use objects, I wrote it in C.

About

A Tetris game that runs in the terminal, written in C using just the standard library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages