Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes for the Thermometer Bug Fixes #794

Merged
merged 44 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
653c816
Fixed Short Truth Table case rule bug (#707)
charlestian23 Jan 26, 2024
4608222
Skyscrapers Test Suite (#708)
charlestian23 Jan 30, 2024
80cb273
Skyscrapers puzzle editor (#720)
jadeandtea Feb 7, 2024
c2ab8d9
Starting work on thermometer class
ZevCe Feb 13, 2024
ca7de69
Added Vial Class
ZevCe Feb 14, 2024
8c4ebc8
Merge remote-tracking branch 'upstream/master' into thermometer
ZevCe Feb 19, 2024
07b85cd
Discontinuous Mercury Rule added
ZevCe Feb 19, 2024
2190f7e
Java Autoformatter (#728)
jadeandtea Feb 21, 2024
b1e2f93
Java21 (#714)
FisherLuba Feb 21, 2024
ea6df89
Merge branch 'master' into dev
charlestian23 Feb 21, 2024
2b036c0
Update build.gradle (#741)
charlestian23 Feb 21, 2024
5189a0b
Updating to version 6.0.0
charlestian23 Feb 21, 2024
898add4
Merge remote-tracking branch 'upstream/master' into thermometer
ZevCe Feb 22, 2024
e03c923
Merge branch 'thermometer' of https://github.com/ZevCe/LEGUP into the…
ZevCe Feb 22, 2024
32371ed
Merge pull request #740 from Bram-Hub/dev
Chase-Grajeda Feb 23, 2024
678da44
Merge branch 'thermometer' into thermometer
Fuzzabee Feb 27, 2024
b1e738a
Merge branch 'thermometer' of https://github.com/ZevCe/LEGUP into the…
ZevCe Feb 27, 2024
caeeef4
Importer written
ZevCe Mar 1, 2024
43d1305
small bug fixes
ZevCe Mar 1, 2024
cd124ea
Added Puzzle Factory and Importer
ZevCe Mar 12, 2024
e952533
Merge remote-tracking branch 'upstream/master' into thermometer
ZevCe Mar 15, 2024
fea9223
Delete ThermometerExporter.java
ZevCe Mar 15, 2024
20a4b4d
Merge remote-tracking branch 'upstream/thermometer' into thermometer
ZevCe Mar 15, 2024
cce8ee5
Added Thermometer to Config file
ZevCe Mar 15, 2024
1fdc396
Added necessary code to constructor
ZevCe Mar 15, 2024
f9fc1f5
Merge remote-tracking branch 'upstream/thermometer' into thermometer
ZevCe Mar 15, 2024
744df30
Messing with Rule Recognition
ZevCe Mar 15, 2024
68b4f20
Merge remote-tracking branch 'upstream/thermometer' into thermometer
ZevCe Mar 15, 2024
a62ec86
Fixing desyncs in repo
ZevCe Mar 19, 2024
d285afa
More syncing and organizing files
ZevCe Mar 19, 2024
cba0779
Small misc improvements
ZevCe Mar 19, 2024
0771835
Fixed verify vial method
ZevCe Mar 19, 2024
ae7359c
Merge branch 'thermometer' into thermometer
Fuzzabee Mar 20, 2024
c74d877
More work towards visual display
ZevCe Mar 22, 2024
b7f906a
Merge branch 'thermometer' of https://github.com/ZevCe/LEGUP into the…
ZevCe Mar 22, 2024
9e2955f
Update ThermometerElementView.java
ZevCe Mar 26, 2024
3adeea9
Merge branch 'thermometer' into thermometer
ZevCe Mar 26, 2024
af47353
Merge remote-tracking branch 'upstream/thermometer' into thermometer
ZevCe Mar 26, 2024
024778a
Merge branch 'Bram-Hub:thermometer' into thermometer
ZevCe Mar 26, 2024
8a0109b
Merge branch 'thermometer' of https://github.com/ZevCe/LEGUP into the…
ZevCe Mar 26, 2024
f0d07af
Rotating images!!!!!
ZevCe Mar 29, 2024
2a3aae6
Added in placeable elements
ZevCe Mar 29, 2024
997b7b4
Stabilizing bug fixes
ZevCe Apr 2, 2024
d9f9a4b
Import silliness
ZevCe Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import java.util.ArrayList;

import static edu.rpi.legup.puzzle.thermometer.ThermometerVial.verifyVial;

public class ThermometerBoard extends GridBoard{

//an array containing all of our vials on the board
Expand Down Expand Up @@ -87,9 +85,15 @@ public int getColNumber(int col){
public ArrayList<Integer> getColNumbers() { return colNumbers; }


//we all suck at programming so instead of using provided array list
//instead just trusting vials to store the cells for us
@Override
public ThermometerCell getCell(int x, int y){
if(x < 0 || y < 0 || x > dimension.height || y > dimension.width) return null;
return (ThermometerCell) super.getCell(x, y);
public ThermometerCell getCell(int x, int y) {
for(ThermometerVial vial: this.thermometerVials) {
for(ThermometerCell cell: vial.getCells()){
if(cell.getLocation().x == x && cell.getLocation().y == y) return cell;
}
}
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ public class ThermometerCell extends GridCell<Integer> {
private ThermometerType type;
private ThermometerFill fill;
private int rotation;
public ThermometerCell(Point location) {
public ThermometerCell(Point location, ThermometerType t, ThermometerFill f, int r) {
//since we do not use get/set data value int can be any value
super(0, location);
type = ThermometerType.UNKNOWN;
fill = ThermometerFill.UNKNOWN;
rotation = 0;
type = t;
fill = f;
rotation = r;
}




//Note: setdata does not work for our purposes
public void setType(ThermometerType t){
type = t;
}


public ThermometerType getType() {
return switch (type.ordinal()) {
case 0 -> ThermometerType.UNKNOWN;
Expand Down Expand Up @@ -54,7 +50,7 @@ public ThermometerFill getFill() {

@Override
public ThermometerCell copy() {
ThermometerCell copy = new ThermometerCell((Point) location.clone());
ThermometerCell copy = new ThermometerCell((Point) location.clone(), this.type, this.fill, this.rotation);
copy.setIndex(index);
copy.setModifiable(isModifiable);
copy.setGiven(isGiven);
Expand Down
Loading
Loading