Commit Graph

12 Commits

Author SHA1 Message Date
Cory e7f8ec11c5 I fixed the flickering! And I have an interior! 2024-05-21 19:11:03 -04:00
Chris Proctor 33c496ac46 Add assessment 2024-05-20 16:38:23 -04:00
Cory 374952d65a This is the FINAL version of what I'm submitting.
This is a version of minesweeper. You win by
isolating every mine, which is the same as
revealing all numbered spaces. There is no flag,
so you have to keep track of, or figure out,
what's revealed. The game ends if you win as
described above or you lose by selecting a mine.

I have playtested this and confirmed that the
game ends in a win by meeting the above criterion.
I also (not intentionally) confirmed you lose if
you select a mine. I did the latter far too many
times...

Things to note:
-I have the game in debug mode so that
instructions appear.
-There is no score. I don't think there's a
score in minesweeper. You either survive the mines
or die.
-I have not implemented flagging potential
locations of mines. You can technically play
without them, so I don't think you lose out on
any of the core gameplay.
-I'm not sure why, but when the game ends, some
of the mines don't show up and some of the
revealed numbers disappear.
-Because two displayed agents cannot occupy the
same space, navigating with the cursor over mines
or numbered squares may require pressing an arrow
key multiple times. (I tried to not display the
mines and then display them only when revealing
spaces, but the revealing algorithm didn't work
when I tried it like that. I promise I spent
hours trying to get it to work before settling on
this current iteration.)
-You can lose on the first move...
2024-05-19 04:06:01 -04:00
Cory 8e54c5fe12 Okay... I don't know why it doesn't work when
the mines can be hidden, so I have a janky
workaround. You might have to try moving the
cursor multiple times but at least now it actually
works. Next step, add flagging!!!!
2024-05-19 02:33:51 -04:00
Cory 75618c1de1 I got the numbers to show up! Now I just need to
add flag functionality and I think we're good?
2024-05-19 00:52:09 -04:00
Cory f0e166d6bd I somehow uncommented something by accident!
I recommented it.
2024-05-18 22:46:21 -04:00
Cory e615e99e75 I got all of the free spaces to determine the
number of mine neighbors they have and change
their characters correspondingly.
2024-05-18 22:40:01 -04:00
Cory 71e22504ab I made everything spawn on turn 1 using the
Spawner class. When you press enter, you're told
if the space is clear or is a mine, in which
case you lose. Next step is to reveal the numbers.
2024-05-18 21:59:57 -04:00
Cory cb8b28b68c Got it to end if the enter (return) key is used. 2024-05-18 21:07:36 -04:00
Cory 3334db0c8b Figured out how to spawn a mine and end the game
if the cursor is over the mine. We now have to
not end the game until the user SELECTS the space
the mine is at. I hadn't realized that is_empty
only works if display is True? So I moved the
game.end() to the mine class.
2024-05-18 21:03:33 -04:00
Cory cff4129336 Installed retro and got a cursor that moves...
Need to do:
-Populate 10 mines randomly
-Have the game end when a mine is selected (figure
out how to select something)
-Figure out an algorithm to reveal squares
-Figure out how to show numbers in revealed
squares
-Add flag functionality?
2024-05-18 20:24:36 -04:00
cchung 6145f70c95 Initial commit 2023-08-25 14:34:58 +00:00