lewisgaul / minegauler Goto Github PK
View Code? Open in Web Editor NEWA clone of the original minesweeper game with many added features
License: GNU General Public License v3.0
A clone of the original minesweeper game with many added features
License: GNU General Public License v3.0
Cover the minefield canvas with a grey rectangle?
The main window shouldn't be made bigger than the available screen size - instead the minefield should use scrollbars.
I think what we want to do is hard-code a max number that we support, which for now I'd set to 8*3=24 (8 cells, max 3 mines per cell). We should also handle the case where an image is missing (needed given 18 < 24!).
Maybe even change button sizes based on screen resolution??
This can be used to play back the highscore in a video-like manner, which in turn gives a way to verify highscores to some degree.
At a URL and as a label on the repo. While adding labels, it would be good to add black and isort labels too.
It would probably be better for the frontend to share state rather than multiple of them storing e.g. the game state. There's also calling between them (via the controller?) that could be done using signals (see the at_risk and no_risk signals).
Requires solving the problem of having pop-up windows.
E.g. when going from a filter with no highscores shown to one where highscores are shown - all/some of the rows are too tall until you click a filter header again.
Loading a custom board sets the board size, number of mines, and max mines per cell. Of those, only the board size should be permanent - when a new game is started the number of mines and max per cell should be reverted. Currently the max mines per cell are accidentally reverted.
The mines counter and timer text is slightly too high and far right (at least on my setup...). I would also prefer the black background to look more like my original Tkinter version (square corners and sunken border).
C Zig code! Plus some funky GUI stuff to work out...
Closing on a certain mode and then opening highscores whilst on the custom board setting opens the wrong highscore settings
Not sure if triggered by running for a long time, playing lots of games, completing lots of games or setting lots of highscores.
This has been seen once when running in WSL, mostly playing lots of beginner games over a period of an hour or two.
There should be options to open text windows containing the contents of some of the files in minegauler/files/
.
For beginner the window is started up too big, and the window shouldn't be resizable in general.
For some reason there is a case where scrollbars are appearing when the window is at maximum size, so the scrollbars shouldn't be needed. This is was seen on Windows 10 with Python 3.7, using requirements.txt
.
Caused by bad fix for #50
E.g. when you toggle drag select mid-game it doesn't change until you start a new game because it is used for highscores.
Some of the infra is already in place - the difficulty is how far-reaching the changes need to be (from the game object, through the controller and into the panel widget for deciding which face to use, AND the menubar buttons passing back to the controller).
Start with button styles, which was previously implemented and there are some example styles in the repo (e.g. butterfly).
BaseMainWindow.__init__()
has a dependency on some setup in MinegaulerGUI
, meaning super()
can't be called at the top of MinegaulerGUI.__init__()
. This clearly indicates something needs tidying up...
Perhaps there should be an overall controller that passes calls to the registered controller, and that 'master' controller would receive the requests to switch modes. There's also some code that could be shared e.g. between the game controller and the create controller. Will need to make sure any changed settings are propagated to the new controller when switching out (can just create a new one with the current opts?).
e.g. double left click in create mode, but also both click in a normal game (if done too quickly the second click isn't treated as a separate single click?).
Docstrings have got out of sync with the code. Also the format used has become inconsistent - we should be going with the reStructuredText format.
Needs some thought:
It seems the version of PyQt5-sip in use (PyQt5-sip==4.19.13) is not available on Python 3.8, but the latest version is causing a crash in the tests (not just on 3.8)...
The idea is instead of beginner being 8x8 small cells it'd be 4x4 cells that are twice the size, the aim is still to click all safe cells - if you know a big cell is safe you can just click it to reveal a number, but if a big cell is unsafe you right click it and it splits into the 4 small cells and you then have to work out which of those is safe.
In other words you could first right-click all the big cells to get back to a normal beginner board, but that would be disallowed (wrong right clicks on big cells lose you the game).
In core/engine.py
get_highscores()
again - add a 'refresh' button?)Originally posted by @LewisGaul in #37 (comment)
In minesweeper the numbers represent the number of mines in the surrounding cells - neighbouring cells are those that share an edge or a corner, normally 8 cells. The strength of the detection could be changed such that only the surrounding 4 cells sharing a edge are detected, or such that a wider group of cells are detected.
An easy way to visualise this in-game is by clicking with the left and right mouse buttons both at once during a game.
This is unintentionally possible when running through an x-server (XLaunch), but actually it can be nice to block everything else out.
This state should be persisted over restart.
Requested by Kyle
The scrollbar work is half completed.
Originally posted by @LewisGaul in #47 (comment)
frontend.minefield:init_or_update_cell_images()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.