Creating a Typing Game Using Bash

Beginner

In this project, you will create a simple typing game using a shell script that displays random characters on the screen and challenges you to type them before they disappear, with options to practice typing numbers, letters, a mixture of both, or custom words.

LinuxShell

Introduction

In this project, you will learn how to create a simple typing game using a shell script. The game displays random characters on the screen, and your goal is to type them before they disappear. The game offers different modes with varying difficulty levels. You can choose to practice typing numbers, letters, a mixture of both, or even your own custom words.

👀 Preview

Shell Typing Game

ðŸŽŊ Tasks

In this project, you will learn:

  • How to create a project file and open it in a code editor
  • How to display a welcome interface using special characters and colors
  • How to implement a mode selection menu for choosing the difficulty level
  • How to implement a typing category selection menu for choosing the type of characters to practice
  • How to create functions for drawing a border and filling the background color of the typing interface
  • How to generate random letters and numbers for the typing game
  • How to implement the typing functionality, including handling user input and calculating accuracy
  • How to create a graceful exit function to handle special signals

🏆 Achievements

After completing this project, you will be able to:

  • Demonstrate shell scripting fundamentals
  • Use special characters and colors in terminal output
  • Read input from the user in shell scripts
  • Implement menus and user interfaces in shell scripts
  • Handle special signals in shell scripts

Teacher

labby

Labby

Labby is the LabEx teacher.