/JMines

:triangular_flag_on_post: :bomb: A simple Minesweeper clone that demonstrates a handful of programming concepts

Primary LanguageJava

JMines

A simple Minesweeper clone that demonstrates a handful of programming concepts

Really? Minesweeper?

Yes. Really. It's for learning/teaching purposes. And it's a fun game.

GUI CLI
GUI CLI

What's to be learned here?

The idea is to have a well-documented, readable, Open Source implementation of a fun game nearly everyone knows. It's intended to be used for teaching Java and OOP in a class at the University of Cologne, but everyone's welcome to use it as a learning resource.

All this is still 🚧 work in progress! 🚧

  1. The game has both a GUI (graphical user interface) and a CLI (command line interface) completely indepentent of each other. The games' core doesn't care which interface it is communicating with. In fact, it doesn't even know. This teaches separation of concerns. And a bit of GUI programming, obviously.
  2. The game implements the MVC pattern (Model-View-Controller), as it clearly separates Model (the classes GameState and Cell), View (the user interfaces JMinesCli and JMinesGui) and Controller (the class JMines) logic.
  3. The user interfaces (views) and the core game logic class JMines (controller) don't need to "know each other". The whole communication is implemented using callback interfaces (straight from 1996!), effectively achieving inversion of control.
  4. In all of the above, there's a lot of object oriented programming.
  5. Playing the game itself will teach you logical thinking.

Third party attribution

The game is currently using a handful of icons form icons8, so thanks for those icons! 👐