100 Days of Code Day 27
Today’s exercise was Gigasecond. You just return a Date Time that is a billion seconds after the one give. I thought surely there can’t be too many ways to do this, but everyone else used a slightly different method to me. I must be strange.
Yesterday the radio buttons weren’t working. It turns out that if you have a StringVar object and set it to a string without using the .set() method you end up changing it into a string and break everything. The radio buttons now work and the program now plays Tic Tac Toe. You can play human vs human, computer vs computer or human vs computer where you can choose who is X and goes first. You can also choose difficulty level that sets how many levels the apha beta min max search does. Finally I added an about box for good measure.
I think it is largely done but there are some upgrades I could do.
- Save state to a file for difficulty level and player vs player preferences.
- Auto-start a new game on the default settings at program start. So you don’t have to manually go File\new
- Add help system from the minesweeper game.
Since it is a rosetta version, I don’t know if I want to do all of the bells and whistles. I may take a break and come back to it again later. Maybe I need to do a C# and JavaScript version to justify it being in the rosetta repository.
Part of the reason I did this with alpha beta min-max search was so I could make a checkers program (maybe chess). I could try working on that too.
