TranslateProject/sources/tech/20181208 Play Tetris at your Linux terminal.md
2018-12-10 19:31:28 +08:00

3.4 KiB
Raw Blame History

Play Tetris at your Linux terminal

Recreate the magic of the 1980s with everyone's favorite tile-matching game, Tetris.

Thanks for joining us for today's installment of the Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself, whats a command-line toy. Even I'm not quite sure, but generally, it could be a game or any simple diversion that helps you have fun at the terminal.

It's quite possible that some of you will have seen various selections from our calendar before, but we hope theres at least one new thing for everyone.

I promised when I started this series I'd be including games, but so far I've neglected to, so let's fix that with today's selection: Tetris.

Tetris and I are almost exactly the same age, having first come into the world in the summer of 1984. Instead of rural North Carolina, though, Tetris originated in Moscow in what was at the time the Soviet Union.

After taking the world by storm, Tetris was cloned many, many times. I would suspect you could find a Tetris clone for just about any operating system in any language you looked for. Seriously, go look. There are some fun ones out there.

The version I'm bringing you for today's command-line toy is written in Haskell, and it's one of the better-done versions I've seen, with on-screen preview, score, help, and a clean look.

If you're willing to run a compiled binary from an untrusted source (I wouldn't recommend it), you can grab that directly, but for a safer approach, it's also easy to use a containerized version with dex, or to install from source with stack.

This particular Tetris clone is by Sam Tay and available under a BSD license. Check it out!

If you've got your own favorite Tetris clone (or maybe you've written your own?), let us know!

Do you have a favorite command-line toy that you think I ought to profile? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end.

Check out yesterday's toy, Plan your own holiday calendar at the Linux command line, and check back tomorrow for another!


via: https://opensource.com/article/18/12/linux-toy-tetris

作者:Jason Baker 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出