Skip to content

luksamuk/9mine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

9mine

Console Minesweeper clone for Plan 9 from Bell Labs.

./9mine.gif

Introduction

This is a console port of Minesweeper for Plan 9. The main goal was to build a small game which would satisfactorily run on Plan 9, while taking advantage of it to learn more about how to write C programs for this OS.

Building

You can either build this program for Plan 9 (using mk) or for Linux (using make and plan9port). All you need to do is compile the 9mine.c file.

On 9front

cd to the src folder, then run mk. This will build a 9mine application.

If you wish to install it to your system, just run mk install. This will move your application to your architecture’s bin/games folder. You will then be able to launch it using games/9mine.

Cross-compilation is also possible through mk. For example, to build the game for amd64, just run objtype=amd64 mk. The rest can be figured out from 9front’s FQA and the manpages.

On Linux

Make sure you have plan9port installed, and 9c / 9l are present in your $PATH.

cd to the src folder, then run make. This will produce a 9mine executable for your system’s architecture.

No installation means were provided for Linux, however it should be portable enough. The produced binary should have all Plan 9-related libraries statically linked already.

Usage

The interface is pretty straightforward, as you can see on the gif. CLI will guide you.

You can either step at an uncovered spot, put flags or doubts, and quit the game.

Passing the -d flag will start the game in Debug Mode, so you’ll get a Godview option to see all numbers and bombs in runtime as well.

Quitting the game will point the bombs in your current field.

Support

This program was tested on the following systems:

  • Void Linux x86_64 (with plan9port);
  • 9front “Run From Zone” (2018/09/09).

I did not test it on other Plan 9 distributions. If you do, give me a heads up.

Issues

  • [ ] Display flag and bomb count
  • [ ] Add game winning logic

Thanks

Thanks to Ricardo Lanziano (arpunk) for explaining a lot about Plan 9 stuff to me.

License

This program is free software, distributed under the BSD 2-Clause License. Copyright (C) 2019 Lucas Vieira.

Screenshots

./9mine-9front.png

About

Console Minesweeper clone for Plan 9

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published