Bits of Learning

Learning sometimes happens in big jumps, but mostly in little tiny steps. I share my baby steps of learning here, mostly on topics around programming, programming languages, software engineering, and computing in general. But occasionally, even on other disciplines of engineering or even science. I mostly learn through examples and doing. And this place is a logbook of my experiences in learning something. You may find several things interesting here: little cute snippets of (hopefully useful) code, a bit of backing theory, and a lot of gyan on how learning can be so much fun.

Friday, June 13, 2014

A Battleship Game

Presenting for your entertainment a simple battleship game. The biggest testimonial for it was that my 5 year old son played it, finished playing, and liked it. Since the first time, he has often requested to be allowed to play it.

My objective of building this game has been primarily educational. 

  1. to get back to C++
  2. to create a practical example of software design of what could be a term-project
  3. to use OO best practices with design patterns like singleton, template etc.
  4. to approximate a model-view-architecture
  5. to implement the Smart CPU using a finite state machine

Additionally, the design has flavours of functional design.

But, those are secondary. If you get to play the game, and 5 minutes of your time go in a lightweight tussle with the machine, the real objective of this project is achieved.

Would be thankful for feedback and bugs.

No comments: