Recent Work, 5/19/2016

If you'd like to try the latest working game, it's here.  There's only a Windows version available right now, but there's also a link to the current source code (with, possibly, some horribly exposed bugs) if you want to run it on your machine.

Segment Fixes:

  • Got the segments redrawing correctly when moving logic elements around.  Minor work required on Segment() class, a little more in LogicWire().
  • Dropping the element on the pad just needed a reordering of the connection algorithm in the game loop.

Current Errors:

  • Vertical wire segments disappear randomly  (and have never reappeared and their container wires do not respond when I click on the place they should be) when:
    • a logic element is moved up and down.
    • a logic element is dropped atop a terminal.
  • Clasps go to strange places.  They will react now, but they don't go to the correct location, and sometimes get stuck on an input terminal.  They don't necessarily appear in the correct spot.  Most likely culprits:
    • LogicClap's set_position() method.
    • Segement's get_location() or get_distance() methods.
    • LogicWire's add_clasp(), get_relative_position(), or reset_pads() methods.

Reminders for Refactors:

  1. Graphics Refactor
    • Do all drawing through a wrapper class that will contain the vector graphics function as well as subscribing to the Theme.
    • This will allow changes in style based on user preferences:
      • The user will be able to change the color scheme of the game.
      • The user will be able to change the output style from IEEE symbols to European-style symbols, etc.
    • This will also help when implementing scaling for working on larger problems (5 or more gates).
  2. Screen Refactor
    • Need to encapsulate screens into Screen objects (the whole point of the LogicScreen package) to reduce duplication.
    • Should do similar work with the controller.