Skip to content

Coin Collector is a console game where the player moves a character to collect coins while avoiding enemies. It utilizes standard input/output and the time.h and windows.h libraries for console manipulation. The player moves with the W, A, S, and D keys and the game becomes progressively challenging as coins are collected.

Notifications You must be signed in to change notification settings

Cybove/CoinCollector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

CoinCollector

Coin Collector is a simple console-based game in C programming language. The game involves a player 'P' who moves around a game area to collect coins '+' while avoiding four enemies 'E'. The game area is a rectangular box with a border, and the player can move up, down, left, or right using the 'w', 's', 'a', and 'd' keys, respectively.

The game uses the 'conio.h' and 'windows.h' libraries to enable console output, hide the cursor, and set the console cursor's position. It also utilizes the 'stdlib.h' and 'time.h' libraries to generate random numbers for the coins' position.

The game has four enemies that move vertically within the game area. The game difficulty increases as the player collects more coins, which makes the enemies move faster. The game keeps track of the player's score and the elapsed time. The game ends when the player collides with any of the enemies.

This code can be used as an example for students learning C programming language or as a starting point for developing a simple console-based game.

2023-02-26 17_16_58-C__Users_ataug_Masaüstü_a exe

About

Coin Collector is a console game where the player moves a character to collect coins while avoiding enemies. It utilizes standard input/output and the time.h and windows.h libraries for console manipulation. The player moves with the W, A, S, and D keys and the game becomes progressively challenging as coins are collected.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages