2048 in the terminal
11–20 of 90 posts
Re: 2048 in the terminal
#12Re: 2048 in the terminal
#13I didn't get around to write a good AI, but you can uncomment two lines in the main to play yourself. The interactive play is not colorful or as polished, but works the same way.
If you want to write a bot yourself, just call "play_bot(logic)", where "logic" is a function that takes a board state and returns a play. "play_bot" returns the highest piece created.
Re: 2048 in the terminal
#14Re: 2048 in the terminal
#15Remember when we were 12 years old and this was how we wrote all of our games? Hell, not just games, anything.
Re: 2048 in the terminal
#16I've been playing with GoLang lately and started to implement 2048 this week as a learning exercise. Nicely done!
Re: 2048 in the terminal
#17going to make a PR that has support for vi-like navigation, (hjkl)
Re: 2048 in the terminal
#18Damn you, you beat me to it. I've been playing with GoLang lately and started to implement 2048 this week as a learning exercise. Nicely done!
EDIT: Still in the window! 2048 is not used by many projects. So essentially zero risk of a port conflict hosting this on a server with other services running.
Re: 2048 in the terminal
#19Love it! Is there a way to change the colors? 4 is Incredibly hard to read in my terminal
Edit: I’m on it.
Edit 2: I added a `--mode` option in the last version (0.1.7) to change the default colors mode. Use 'dark' on a dark background and 'light' on a light one. For now it only replaces dark blue with white on dark mode and yellow with black on light mode.
TL;DR: update with `pip install -U term2048` and use `term2048 --mode dark`.