Previous Entry Share Next Entry
So... There's Smalltalk
blaisepascal
In the private programming front, not much has been going on lately. I've been helping out/assisting my friend Marty on a couple of his projects -- but the code is his, and he's done most of the work. Recently, he's been writing a Dominion card game simulator/engine in Haskell, in part to get some practice and understanding of the Haskell language and it's oddities. It works pretty well, and a few lines of code came out of my fingers, but it's pretty much his beast.

Of course, reasonable people can disagree about the best way to do things, so looking at his progress I've felt that a different approach would be a good one -- but since it's his program, I can't do it. So I've been itching to write a Dominion simulator of my own. And perhaps learn a new language in the process. I've also been intrigued for years by Smalltalk, so this seemed like a good time to try learning it.

On Friday I tried a couple of ways to get a Smalltalk development environment on my computers. I didn't really succeed to begin doing any work until Saturday.

Since then, I've:

  • Installed the latest version of Squeak Smalltalk on my desktop and laptop machines
  • Started working through the Laser Game online Smalltalk tutorial (which I've started before)
  • Stopped working through the Laser Game tutorial, and started on the Dominion Game
  • Broke my development environment to the point where I had to export my code, reset the environment, and reload it and hope things worked.
  • Built the game up to the point where I could implement AI players to play against each other in simplified versions of the game (for Dominion players: base cards only, no Kingdom cards. BigMoney is the only strategy).
  • Implemented the Smithy card, forcing me to finish the basic game-playing engine
  • Implemented the BigMoneySmithy strategy, so I could have two different AI players
  • Started implementation of the "Human" Strategy, which allows human players
  • Played a bunch of games against the AIs, while debugging the game and strategies
  • Exported my code again, installed Pharo Smalltalk, decided it was a nicer environment than Squeak, and imported my code
  • Fixed bugs caused by difference between Squeak and Pharo
  • Started building out a nicer UI for the game, so now the player has a better idea what their hand is, etc.
  • Added Village and Market cards
  • Implemented the VillageSmithyEngine strategy

All in all, a very productive 2-3 days of programming in a language and environment I'm not familiar with. It's not perfect, but it's playable (for very simple games). Now I'm off to show it to my fellow local Dominion players, including Marty.


?

Log in

No account? Create an account