Skip to content

[4] Solving: Test Maze#9

Merged
phillpeters merged 3 commits intomainfrom
4-solving/temp-maze
Aug 3, 2022
Merged

[4] Solving: Test Maze#9
phillpeters merged 3 commits intomainfrom
4-solving/temp-maze

Conversation

@phillpeters
Copy link
Copy Markdown
Collaborator

@phillpeters phillpeters commented Aug 3, 2022

image

This is a 10x10 temporary maze to test the solving algorithm. The maze is generated from a static 2D array that I've saved in a module called test-maze.js in the root of src.

export const testMaze = [
  ['S', '0', '0', '#', '0', '0', '0', '#', '0', '0'],
  ['#', '0', '#', '0', '0', '#', '0', '#', '#', '0'],
  ['#', '0', '0', '0', '#', '#', '0', '0', '0', '0'],
  ['0', '0', '0', '#', '0', '0', '0', '#', '0', '0'],
  ['0', '0', '0', '#', '0', '0', '#', '#', '0', '#'],
  ['#', '0', '#', '0', '#', '0', '0', '0', '#', '0'],
  ['0', '#', '#', '0', '0', '#', '#', '0', '#', '0'],
  ['0', '0', '0', '0', '0', '0', '0', '0', '#', '0'],
  ['0', '0', '0', '0', '#', '#', '#', '#', '#', '0'],
  ['0', '#', '0', '0', '0', '0', '0', '0', '0', 'F'],
];

I'm using a lifecycle hook to style the maze by identifying the elements with 0s and #s and changing the background color and text color respectively.

Closes #4

@phillpeters phillpeters linked an issue Aug 3, 2022 that may be closed by this pull request
@phillpeters phillpeters requested a review from Thenlie August 3, 2022 20:20
@Thenlie Thenlie added the type: component New component or page label Aug 3, 2022
@Thenlie Thenlie added this to the Maze Solving Component milestone Aug 3, 2022
Copy link
Copy Markdown
Owner

@Thenlie Thenlie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great man, nice work! 🚀

✅ Approved!

@phillpeters phillpeters merged commit 0221270 into main Aug 3, 2022
@phillpeters phillpeters deleted the 4-solving/temp-maze branch August 3, 2022 22:58
Thenlie pushed a commit that referenced this pull request Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: component New component or page

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create hardcoded maze

2 participants