samtay / tetris

A terminal interface for Tetris
Other
871 stars 40 forks source link

Is it possible to change the color of the blocks? #22

Closed mainrs closed 1 year ago

mainrs commented 1 year ago

I want to have them all black. It seems that you are using the terminal colors. I have almost zero experience with Haskell, so if you can provide me with instructions on how to change the color, I'd be really grateful!

samtay commented 1 year ago

No, it's not possible without changing the code. They're set according to the traditional colors. If you did want to change them to all black, it would be very easy to do so locally:

  1. If you already have tetris installed, remove it, e.g. rm $(which tetris).
  2. Download stack
  3. Change the color mapping here to set them all to black. You could probably just replace that entire function with
    tToColor :: Tetrimino -> V.Color
    tToColor _ = V.black
  4. Run stack install. Grab a coffee if it's your first time running stack 🙂
  5. Run tetris (if this doesn't work, double check that step 3 went to somewhere on your PATH).
mainrs commented 1 year ago

Run stack install. Grab a coffee if it's your first time running stack

That actually took a really long time haha. I did not expect that!

Thanks!