Code Monkey home page Code Monkey logo

connectblox's Introduction

ConnectBlox

This is a web clone of the game "Connect Me - Logic Puzzle" by Viktor Bohush.

Todo

  • [FIXED] Make the game playable - FIXED
  • [FIXED] make the puzzles solvable. (Falls into "make the game playable") - FIXED
  • [FIXED] fix the checkBoardForSquare function. It always returns undefined - FIXED
  • [FIXED] fix the dragging functionality. It likes to drop peices and pick up new ones when dragging over other pieces. - FIXED'
  • Add some UI elements. (buttons (maybe from a library), modals, toast if possible, etc.)

Notes

  • The game is not playable yet. It is just a board with peices that can be dragged around.
  • add editor. (this is next). The editor will allow you to create your own puzzles. It will also allow you to save and load puzzles. (that is a bit further down the road).
  • The state of the program (editor or gameplay) will be controlled via a single variable. This will be set in the sketch.js file. This will allow for easy switching between the two states. you can switch with the 'e' key. The gameplate will be the default state.
  • the 'l' key will load a level. 's' will save a level. these will be saved locally to the computer.

Thoughts

  • backspace will delete a square.
  • clicking a square will also select that square. (this will be used for the editor)
  • the state of square editing will be controlled by a variable. *editingSquare" (this will be used for the editor)
  • in mousePressed function
if (isEditing) {
    get square to be clicked
    '1' will add a connector to the top of the square. if there is already 4 connectors, then all top connectors will be removed.
    'r' will rotate the square.
    '2' will add a connector to the right of the square. if there is already 4 connectors, then all right connectors will be removed.
    '3' will add a connector to the bottom of the square. if there is already 4 connectors, then all bottom connectors will be removed.
    '4' will add a connector to the left of the square. if there is already 4 connectors, then all left connectors will be removed.
}
  • if we are in "add square" mode, then we will add a square to the board when clicking, instead of editing. if a square already exists, then we should not add a square.
  • .
  • the modal will include two buttons.
  • both buttons will be the same size.
  • both buttons will have the option of being or hidden, but not both at the same time.
  • the buttons will be on the bottom of the modal.
  • the buttons will have the function "positiveButton" and "negativeButton".
  • the modal will return a result. if POSITIVE, then we can call the positive function. if NEGATIVE, then we can call the negative function.
  • the modal buttons will be of a separate class. this will allow for no event handling.
  • the modal will have a function that will be called when clicked. it will check to see if click was in the bounds of the modal buttons. this will return to the modal the result of the button.
  • the modal buttons will have a function that will have a function called inBounds. this will check to see if the mouse is in the bounds of the button. this will return a boolean.
  • depending on the button returning true, the modal will set the status of the button. This can return to an async function that will do something with the result. maybe.
  • there should also be a button column at the right side of the screen. It will house the buttons for the editor. This will house the buttons for feedback and editing (share, save). It will allow us to add buttons easily in the future.

connectblox's People

Contributors

catz1301 avatar

Stargazers

 avatar

Watchers

 avatar

connectblox's Issues

Create a modal.

This will feature a positive and negative button. Will be opened externally, and closed internally. return modalStatus and undefined as memory management to dispose.

Deleting Squares causes errors when interacting with all other Squares

It appears that when you delete a square, it doesn't get updated in the board array properly, and the console says Uncaught TypeError: Cannot read properties of undefined (reading 'select'). This error is thrown when selecting squares, clicking squares, and moving squares. The only way to fix this is to refresh the page.

Create a button.

This will be tested on the feedback button. If hovering over the button, the button should be slightly darker. features an onclick function. This can include using an existing library.

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.