/tp2048

2048 clone in Turbo Pascal

MIT LicenseMIT

tp2048

A clone/imitation of the game 2048 (http://git.io/2048) in everyone's favourite language environment from the late 80s, Turbo Pascal. The source code is licenced under the MIT licence.

For those of you whose state-of-the-art 486es can't quite handle the Web 2.0 glory of today's sliding tile puzzles.

tp2048 also works in Free Pascal.

Requirements

Turbo Pascal

  • Turbo Pascal, v5.5 or compatible
  • MS-DOS, tested in v7 (Windows 95) but likely works with FreeDOS or crustier DOS
  • A computer (pretty much any IBM PC-compatible with colour graphics should do)
  • Masochism

Tested, and initially written, on MS-DOS 7 and Windows 95 on an Intel Pentium 2 233MHz processor and VGA graphics.

Free Pascal

  • Free Pascal
  • Any computer that can run Free Pascal (possibly)

Tested with Free Pascal Compiler 2.6.2 on Gentoo amd64. (It mostly works!)

Instructions

  1. Getst thou a Turbo Pascal. I used version 5.5, which is legally available free of charge from Borland/Embarcadero. Free Pascal also works.
  2. Getst thou the source code.
  3. Compilest thou thy downloaded source code with thy acquired Pascal compiler.
  4. Enjoyeth.

Questions and Answers

Is this endorsed by the creator of 2048/any similar game?

Gods no! This is a shameless imitation.

Why did you do this?

Because I can.

Why are the graphics so awful?

Who said they were graphics?

I can't compile this? Can you send me a binary?

I can. I'll see if I can find somewhere to dump the binary, but for now it'll have to be compile-it-yourself or on-demand.

Will this break my computer?

The PC speaker cables of the computer on which I programmed this did end up spontaneously combusting during a programming session, so I can't guarantee safety.

Did you copy any code from other games?

Nope, which explains all the bugs, oddities and other things. :-)

There's a bug in this!

If you can file a pull request that fixes it, I'll be yours forever. Failing that, give me a well-written bug report and I'll hop on my Pentium 2 and get to work.

Your source code is broken!

It's somewhat likely that, in the circuitous route from my P2 over floppy diskettes and onto GitHub, something broke in translation. Check the line endings, encoding, etc etc. and file me a bug if there's a genuine breakage.

Does this work in development environments that aren't obsolete?

I managed to compile and run it with Free Pascal on a modern Gentoo distribution, and it mostly worked, so maybe?

Your Pascal sucks! Why are you so lame?

Probably because this is the first thing I've ever written in Pascal. I somewhat avoided it until now. =P