Giter Club home page Giter Club logo

minesweepercollab's Introduction

Hi there ๐Ÿ‘‹

minesweepercollab's People

Contributors

claireshea01 avatar ethanm88 avatar jjjxu avatar

minesweepercollab's Issues

Square class

Attributes needed -

  • number of mines around it (for display)
  • is this an actual mine
  • has this been marked as a mine (i.e. user input)
  • has this space been dug up (i.e. should it be static, should I allow user interaction
  • extra: should we allow the quick clear operation, and has this operation already been conducted on it (should only allow somebody to conduct this operation once)

Operations needed

  • first clear: when the user first hits a square, we need to make sure that the generated pattern doesn't result in a death on the first one: this square also cannot be immediately adjacent to anything else (i.e. should be a space square w/o any number displayed)

  • mark as mine/unmark as mine: self-explanatory

  • dig up: only allow if the thing isn't marked as a mine. can also be invoked via the auto dig method, but should return a value of whether the thing got blown up or not.

  • auto dig: extra, quick clear operation

  • standard getter/setter? maybe omit because that's extra work and isn't really needed in the final version, only for debug.

Game Class

This class should control all local aspects of the game

Local vars (off the top of my head)
probably size
array of squares which is the actual gameboard

  • constructor: takes the size of the game? for resizing GUIs, we can just make every new game a new window

  • start game: takes the coordinates of the first click. First click needs to be on a square that's by definition a 0. This step will also generate the grid. Generation is achieved by defining a fraction of the board (probably around 1/4-1/5) of the game board which are mines. Then, by generating numbers in that range, we can drop mines into the board by sequentially tracing through, skipping numbers in the region that are already marked to be mines or are in the no-bomb zone that is defined by the 3x3 square surrounding the click (error check for edges, etc). This will be a boolean array. Next, we calculate and initiate the real game board. Then, we purge the original boolean, so info hiding has been achieved.

  • operate on a square: passes thru a click with parameters of the given operand, and then calls this method.

  • display: returns a array of int values, for the GUI to parse. This will be called by the GUI after every move.

  • floodfill: when an empty square is hit, we need to keep on going and open up the board.

Not finished, Ethan's code will be modified slightly and JDoc'ed correctly to compliance.

GUI

Consider the image-based thing on swing for a gui (would need to probably immediately associate an image within the structure of the square class) versus the processing version where there would be a parallel data structure that does all the drawing, bordering, etc for you.

Also need terminal I/O thingy first instead of GUI so linking up is easier

how tf do we also enable/disable the buttons so we're not getting random stuff entered

  • KEYBOARD SHORTCUTS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.