Hi Smartbuilder Community,
It took some time, but I finally had time to make an update on the game again. It is a big change, mainly on switching to lists and making a start on finding the best move for the computer. Here are some of my findings and remarks
- I found a way to make a list quickly using the split text block
- Everything is now made with the 'procedure' object as Navdeep advised and showed in
this tutorial. This gives a cleaner overview and is perfect for small games.
- We use lists now instead of the inputtext. Mainly because it is easier to check the lenght of the lists.
- I had trouble with the 'is thing in list' block, so I used the 'is everything in list'. But still not sure what I did wrong. Maybe because a list can not be a 'thing'?
- I also had trouble transfering the only number on a list to another. That's why I used the 'pick random' on lists of 1 item long. I don't understand why I couldn't use the 'copy list' function or just connect the two variables directly to eachother.
- Is it possible to have the possible lists (vertical, horizontal & diagonal) in a map which could iterate the checking procedure? Just to make it more tidy instead of adding all possibilities (checking best move, checking best defence, checking if game finished etc) manually?
I still have a few things I want to improve. But all tips, tricks and ideas on improving or optimizing are welcome ofcoure. I would love to hear everybody's ideas on how to program this game