10 posts
Posted 08 March 2012 - 10:23 PM
Here's my first lua script.
MineSweeperA classic minesweeper game.
Some of the features:
- 3 difficulty levels
- dynamically fits any terminal size greater or equal to 28x6
- optimized for SMP (it sends as few as possible text changes to clients)
- sends redstone signals depending on the game output (feature suggested by Neowulf)
- if the game is won, a 2 seconds signal to the back (could be used to trigger a door)
- if the game is lost, a 1 second signal to the bottom (could be used to trigger a TNT block)
These are the default values, they can be modified by editing the top of the source file.
[attachment=71:minesweeper_v1.0.1.screen1.png][attachment=72:minesweeper_v1.0.1.screen2.png]
InstallationAvailable on
cc-get, simply type:
cc-get install minesweeper
If you want to instal it
manually, the source code is available on
the script cc-get page (click on the 'minesweeper' file).
Changelog<1.1>
* scores implemented
* fixed a critical bug introduced in 1.0.3
<1.0.3>
* the first square uncovered will never be a mine
<1.0.2>
* sends redstone signals depending on the game output
<1.0>
* initial release
88 posts
Posted 08 March 2012 - 10:40 PM
hmmm if I fail will it set off a tnt block underneath the terminal?
10 posts
Posted 08 March 2012 - 10:58 PM
hmmm if I fail will it set off a tnt block underneath the terminal?
That'd be an interesting feature :mellow:/>/>
513 posts
Location
Australia
Posted 08 March 2012 - 11:15 PM
Nice!
33 posts
Posted 08 March 2012 - 11:21 PM
Player wins, send a pulse out the back of the computer (to open a door or something).
Player loses, send a pulse out the bottom of the computer (to trigger the TNT pile beneeth their feet).
88 posts
Posted 08 March 2012 - 11:32 PM
or add terminal controlled turtles for a more user friendly game of "real" minesweeper the turtles could even be used to repair and randomize the playing field
10 posts
Posted 09 March 2012 - 12:00 AM
Player wins, send a pulse out the back of the computer (to open a door or something).
Player loses, send a pulse out the bottom of the computer (to trigger the TNT pile beneeth their feet).
Thanks for the tip, it's now implemented!
or add terminal controlled turtles for a more user friendly game of "real" minesweeper the turtles could even be used to repair and randomize the playing field
I thought about that, I'll see if I find time to code it.
378 posts
Location
In the TARDIS
Posted 10 March 2012 - 09:07 AM
or add terminal controlled turtles for a more user friendly game of "real" minesweeper the turtles could even be used to repair and randomize the playing field
I thought about that, I'll see if I find time to code it.
I could help with this :mellow:/>/>
10 posts
Posted 10 March 2012 - 05:21 PM
or add terminal controlled turtles for a more user friendly game of "real" minesweeper the turtles could even be used to repair and randomize the playing field
I thought about that, I'll see if I find time to code it.
I could help with this :mellow:/>/>
You're free to use my code as long as you license your work under the GPL.
I was thinking the turtle(s) could start by laying out a surface layer, which would hide the TNT placed afterwards underneath. Then the computer would be used to control the uncovering process of the field. It would be some kind of "real life" enactment of the game action.
378 posts
Location
In the TARDIS
Posted 10 March 2012 - 05:46 PM
or add terminal controlled turtles for a more user friendly game of "real" minesweeper the turtles could even be used to repair and randomize the playing field
I thought about that, I'll see if I find time to code it.
I could help with this :mellow:/>/>
You're free to use my code as long as you license your work under the GPL.
I was thinking the turtle(s) could start by laying out a surface layer, which would hide the TNT placed afterwards underneath. Then the computer would be used to control the uncovering process of the field. It would be some kind of "real life" enactment of the game action.
I could help with the controlling that is
10 posts
Posted 17 March 2012 - 09:38 PM
Updated.
1.0.3: the first square uncovered will never be a mine
10 posts
Posted 23 March 2012 - 10:03 AM
Updated.
[1.1]
* scores implemented
* fixed a critical bug introduced in 1.0.3
124 posts
Location
Liverpool (no I am not a Scouser Im form Holland)
Posted 23 March 2012 - 10:09 AM
a few edits here and there and it could be a survival game if you die you die in minecraft not just on the game help im confusing myself
10 posts
Posted 23 March 2012 - 10:20 AM
a few edits here and there and it could be a survival game if you die you die in minecraft not just on the game help im confusing myself
Already possible, in a way, since you can place a TNT block underneath which will be powered when a game is lost :(/>/>