-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added testing for pinned ships * incomplete but need to sync * added psuedo-code for constructor + jsdoc * added directional ship checks and added logic psuedo-code * added uni and bi directional 'solving' * added full row/column 'solving' * horizontal and vertical types are not internal, they are graphical removed INTERNAL_TYPES and fixed all problems associated * added more solving and tested existing solving some minor errors, specifically for rows/columns * added rudimentary images for ships computeGraphicalTypes() needs to be debugged and solve() rebuilt from scratch. gosh freaking darn it * fixed compute graphical types returning early caused all squares after a pinned square to not be computed * fixed copy function and added testing * added check for full rows/cols and for rows/cols that would be full if all unkowns were ships * somewhat fixed solving FINALLY LET'S FREAKING GO * fixed BoardBuilder.copy() mutating the original board * fixed various issues with orthogonal ships. solving now seems to work as expected * added functions to count vertical and horizontal runs with testing * fixed spelling error * updated todo * added getRuns and countRunsLeft functions with testing * Update jest.yml * solving is finally complete --------- Co-authored-by: rpschedule <103065303+rpschedule@users.noreply.github.com>
- Loading branch information
1 parent
03a5125
commit 938f576
Showing
18 changed files
with
4,207 additions
and
2,659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
body { | ||
background-color: black; | ||
color: white; | ||
background-color: rgb(246, 246, 255); | ||
color: black; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
.Board { | ||
display: grid; | ||
grid-template: repeat(4, 100px) / repeat(4, 100px); | ||
grid-template: repeat(15, 50px) / repeat(15, 50px); | ||
} | ||
|
||
.Square { | ||
border: 1px solid white; | ||
border: 1px solid gray; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.Square:hover { | ||
cursor: pointer; | ||
} | ||
|
||
.svg-path { | ||
fill: white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.