https://github.com/codecop/golfed-game-of-tron
This is the JavaScript game of Tron in 219 bytes prepared as Refactoring Kata in different languages.
https://github.com/codecop/golfed-game-of-tron
exercise game golf refactoring-kata
Last synced: about 1 month ago
JSON representation
This is the JavaScript game of Tron in 219 bytes prepared as Refactoring Kata in different languages.
- Host: GitHub
- URL: https://github.com/codecop/golfed-game-of-tron
- Owner: codecop
- License: other
- Created: 2019-12-10T22:38:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T13:27:01.000Z (almost 2 years ago)
- Last Synced: 2025-02-16T19:33:29.406Z (4 months ago)
- Topics: exercise, game, golf, refactoring-kata
- Language: Java
- Homepage: http://quaxio.com/tron/
- Size: 50.8 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# (Golfed) Game of Tron
This code is based on the [javascript game of tron in 219 bytes](http://quaxio.com/tron/)
prepared as Refactoring Kata in different programming languages.## Game of Tron
The usual "Game of Tron" refers to the Light Cycles race from the
[Tron video game](https://en.wikipedia.org/wiki/Tron_(video_game)) which is a variant of the
[Snake video game](https://en.wikipedia.org/wiki/Snake_(video_game_genre)).### Game Rules
The particular game follows these rules:
1. The Tron starts in the centre, facing any direction.
1. The game controls are 'i', 'j', 'k', 'l'.
1. When the Tron hits it's trail or an edge, "game over" is shown to the user.### javascript game of tron in 219 bytes
The [javascript game of tron in 219 bytes](http://quaxio.com/tron/)
by Alok Menghrajani is the smallest possible game of Tron in Javascript
(an exercise known as Javascript [golfing](https://en.wikipedia.org/wiki/Code_golf)).## Refactoring Kata
I expanded some (of the more extreme) golfing tricks to make the code more readable.
The code is compact and lacks proper names and abstractions.
I added some basic tests and the tests all pass.
Now it is time to refactor! Tidy up the code and add some design.### License
[New BSD License](http://opensource.org/licenses/bsd-license.php), see `license.txt` in repository.