Improve your Coding Skills with this Fun Game
Tags: beginners, javascript
Published: 2019-12-01 00:58:24

---
title: Improve your Coding Skills with this Fun Game
published: true
description: Of all the ways of improving your coding skills, a game is among my favorite ways. Playing this game will help you polish your JavaScript and thinking skills!
tags: beginner, javascript
cover_image: https://thepracticaldev.s3.amazonaws.com/i/lohfujmed8o5ag6psr6f.jpg
---

Of all the ways of improving your coding skills, a game is one of my favorites. To skip my commentary you can **[just play the game here](http://bit.ly/ElevatorSagaGame)**.

Elevator Saga is a fun game that uses JavaScript to control elevators. It starts out simple enough, it starts out with one elevator, and 3 floors. Your goal is to move 15 people in 60 seconds or less. 

![Fun JavaScript Game](https://thepracticaldev.s3.amazonaws.com/i/wogvqd3p91bm6mvdx32o.jpg)

You do this by editing the JavaScript included on the page, you can do things like: 

- controlling where elevators go
- controlling what happens when elevator buttons are pressed
- make changes based on how many people are on the elevator

And much more. There’s **[full API documentation](http://bit.ly/2Y0YvoO)** here. 

You don’t need a ton of JavaScript experience to play this game, and it’s not extremely technical. But you will need a mind for solving problems and building software. If you don’t have that already this game will help build that. 

### What to consider

Theoretically, you could just have elevators going up and down floors fast enough and it would move all the people through. This works in the first couple levels but after that you need optimization.

Here are some things you need to think about:

- **Coordinating elevators** - Don’t just make two elevators take the same path, it’s wasteful.
- **Prioritizing busier floors** - Some floors are busier than others, which means just going up and down floors sequentially won’t cut it
- **Optimizing your routes** - Taking wasteful trips adds up. You need to be intentional about controlling where elevators go. 
- **Capacity of elevators** - You have to be mindful about cramming too many people in an elevator. 

These are some things you must think about and write code around. You need to think of the entire system and how to keep people moving quickly. 

## How does this make me a better coder? 

While this game doesn’t use complex JavaScript, it will improve skills you’ll use for development. You must think about the strategy and workflow. You’ll optimize your JavaScript code because it gets old scrolling through all the lines to make changes. You may even start experimenting with different algorithms. 

You can improve your skills and have fun doing it. While it may feel like you’re wasting your time with a game, you’re improving your abilities. I encourage you to [give it a try](http://bit.ly/ElevatorSagaGame) even for a few minutes. It’s lots of fun! 

If you want some more games to try, [Francesco Leardini](https://dev.to/paco_ita) has [shared a bunch of games to improve your web dev skills here](https://dev.to/paco_ita/train-your-javascript-skills-with-online-games-289m). Check it out!