ellismarkf / minesweeper Goto Github PK
View Code? Open in Web Editor NEWclassic minesweeper with a multiplayer twist
Home Page: https://mineswept.com
classic minesweeper with a multiplayer twist
Home Page: https://mineswept.com
Improve /browse
page layout. Use max-width
to constrain layout. Other general UI improvements as necessary.
Should include links to /
from /browse
, /build
, and /play
.
Stopwatch continues counting after player wins game; should stop on final tile click or when game engine determines win state.
When server responds with errors, especially 500
+ errors, render error messages in the UI.
If a user has flagged all mined tiles, the game should end. See #17 for description of what should happen in UI when player wins.
onShouldComponentUpdate
method should check for changes in game state in addition to tile value.
Dashboard should let users choose between playing a randomly-generated game, playing a community-generated game, or building and saving their own custom game to share with others.
If a player hasn't updated the difficulty, clicking icon resets board. If a player has updated difficulty, reinitialize board to selected difficulty.
Players should see a list of saved minefields made by them and others on the screen.
If the GET
request comes back empty, render a message explaining the blank screen, with a link to /build
.
Take advantage of Inferno
's ability to attach componentShouldUpdate
methods to functional components.
Selecting a difficulty for a new random game from the home screen should take a player to a board with the corresponding difficulty. For Custom
random games, initialize the board at easy difficulty with config menu open.
Configure circle.yml
to deploy production build with now
.
Conditionally apply .m1
-.m8
classes based on threats
and swept
props. Otherwise, players can check CSS to cheat!
Include mechanism to filter minefields by difficulty level, probably just a button group with the corresponding emojis.
After building a custom minefield (#36), players should have the option of saving and possibly sharing the minefield. Saved minefields need to be stored somewhere, probably a DynamoDB table, or some other similar solution.
The following functions are deprecated and should be removed in favor of their better (working) counterparts:
getThreatCount
markThreatCounts
While browse page is fetching minefields, render a loading icon.
When a player clicks a mined <Tile />
the game is over. Clicking <Tile />
s is disabled, and all mine positions are revealed. If the player flagged and <Tile />
s, the board should show whether their guess was correct.
When a player wins:
Win conditions:
Emoticon UI language not clear enough by itself; need to add some explanation in some way.
While a player is holding the mouse button down after clicking on a tile, the game status icon should update to ๐ฑ, and return to normal on mouse up (release click).
Change layout to include Loader as part of page (ie renders as an icon or something other than a completely isolated component), or intentionally delay loading state to display loader longer
After 100 seconds, stopwatch stops updating 10 place value, remaining at zero while the rest of the numbers update correctly. Stopwatch should increment 10 place value every 10 seconds.
Right clicking doesn't always place a flag. Behavior is a little unpredictable on Windows? Could be related to resolution? Or possibly incorrectly handling click event.
Research if it's possible to have functional components all the way down, reading from plan JS objects rather than storing anything in state.
After a player initializes a board to the desired difficulty level, their first click on a tile should start the game's stopwatch.
Difficulties:
Currently passing context
, eg the entire stateful component, rather than just binding with arrow functions or in a constructor.
Configure event listeners to respond correctly to a wider variety of inputs, ie laptop touchpads, phone touch events, etc.
After adding inferno-router
, the config menu only opens/closes correctly and consistently on first initialization. Navigating back and forth between pages introduces a bug where the onClick
handler for the config menu icon is called twice, updating the binary state twice, resulting in no UI change.
Research performance impact of using sprites and class names instead of CSS.
Refactor method body with a for
loop for performance gains (map is ๐; refrain from making unnecessary typed array -> array calls)`.
Resetting a custom community minefield initializes the board as a standard random game. Should instead keep/remember custom configuration and reset to that.
Config menu currently updates with every tick of the Minesweeper stopwatch. Try ShouldComponentUpdate
in ConfigMenu
.
When stopwatch reaches 999, it should display 999 forever.
Clicking on a saved custom minefield should load a Minesweeper board with the appropriate settings, and the player should be able to play the game normally.
Use the right DOM event hook (mouseup
), and remove :active
CSS target that styles tile elements on mousedown.
Building a custom minefield involves setting row and column values, and clicking on tiles to place mines.
If the POST
request to save a new minefield succeeds, take user to /browse
page to find their new board.
Send Date.now()
with the rest of the body data when saving minefields.
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.