Remake of the real game, with slightly different rules and AI.
You place a follower on your tile to score. Tiles must fit. Only one follower per feature. Unless two connect later. Highest number of followers on a feature scores. In case of a tie, both players score.
Churches are scored based on the number of surrounding tiles plus one. (At least 4 points, at most 9.)
Cities are worth 2 points per tile. Shield icons add an extra 2 points each. Cities on the edge are considered complete.
Roads are worth 1 point per tile. Unlike the original game, junctions do not split roads.
Farms are worth 3 points for each connected city. Unlike the original game, farms are scored when adjacent cities are all complete.
You are guaranteed to fill the board each time, because I added tiles for all possible cases. Also, you only get tiles you can place.
AI 1 is dumb. It plays random valid moves.
AI 2 tries to find the highest scoring opportunity, or one that gets followers back.
Have fun! I know I did.
Thank you for the likes!
Here are some -probably- interesting details about the implementation:
Did it on my phone from start to finish! Yay! I don't get enough time in front of a computer, but I can code a bit while commuting.
I wrote a display list much like Adobe Flash has for this. For zoom and smooth rotation and click detection. I'm not a math genius, so I had to port some 2D matrix code from EaselJS. Well, at least I know where to copy from. ;)
VIM inside Termux is a great help with the code. I learned VIM solely for this purpose.
Wren is the language. OOP is quite familiar to me from my ActionScript days, so this was good and retro. Wren is better to work with than Moonscript because it shows actual line numbers in error messages, and it's also a lot faster. I had to submit a couple of issues to their bug tracker, but they were very responsive.
And of course it wouldn't exist without the TIC-80. Big thanks to Vadim Grigoruk. You made me rediscover my love for coding.
@andraaspar Thank you for the game :)
This is great! Well done, very close to the original game and actually fun to play.
Maybe there could be an option to suggest only valid placements for tiles and grey out the rest?