5 ms·
I made a terminal clone too, but to play with bots: https://github.com/boppreh/2048bot https://github.com/boppreh/2048bot I didn't get around to write a good A
by BoppreH 13y ago
I made a terminal clone too, but to play with bots: https://github.com/boppreh/2048bot https://github.com/boppreh/2048bot
I 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.