POC to introduce two new features to Tobor#1
Open
lee-treehouse wants to merge 11 commits intomainfrom
Open
Conversation
… starting point and destination
lee-treehouse
commented
Aug 16, 2023
| process.env.TABLE_WIDTH = tableWidth; | ||
| process.env.TABLE_LENGTH = tableLength; | ||
| await run(logger); | ||
| // const exploreBoundaryCases = [ |
Owner
Author
There was a problem hiding this comment.
temporarily commented out while considering testing strategy now there are obstacles as part of the default config.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a POC rather than production ready code to introduce two new features to Tobor
Here is an example of the feature
for a table with
[
{ x: 2, y: 4 },
{ x: 2, y: 3 },
{ x: 2, y: 2 },
{ x: 3, y: 2 },
{ x: 3, y: 1 },
{ x: 4, y: 4 },
{ x: 4, y: 3 },
{ x: 4, y: 2 },
]
[ ] [ ] [X] [ ] [X] [ ]
[s] [ ] [X] [ ] [X] [ ]
[ ] [ ] [X] [X] [X] [d]
[ ] [ ] [ ] [X] [ ] [ ]
[ ] [ ] [ ] [ ] [ ] [ ]
[ ] [ ] [X] [ ] [X] [ ]
[1] [ ] [X] [ ] [X] [ ]
[2] [ ] [X] [X] [X] [11]
[3] [ ] [ ] [X] [9] [10]
[4] [5] [6] [7] [8] [ ]
Which can be presented to the user as follows:
0,3
0,2
0,1
0,0
1,0
2,0
3,0
4,0
4,1
5,1
5,2
PLACE 0,3,NORTH
RIGHT
RIGHT
MOVE
MOVE
MOVE
LEFT
MOVE
MOVE
MOVE
MOVE
LEFT
MOVE
RIGHT
MOVE
LEFT
MOVE
Note: I included a place command in the output as a means of representing the current position before IWANTTOGOTOTHERE was executed.
As discussed this is a POC and would need some polish, a bit of simplification here and there and consideration of test strategies to accomodate different table layouts. Some reworking was also made to give commands more awareness of the table (or other 2d boundary) context and this could use some further thought and improvements.
I'd also like to make it easy for the user to easily try out different obstacle layouts which is currently very difficult.