Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Amazons Rules #7

Open
ColinLefter opened this issue Mar 12, 2024 · 0 comments
Open

Amazons Rules #7

ColinLefter opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ColinLefter
Copy link
Owner

  • Each Amazon can move like a chess queen
    • Technical considerations: you need to define what a legal move is for your AI. Right now, the AI can actually move wherever as there is nothing blocking it from making an illegal move. We need to define those constraints. Approach: maintain 8 pointers to all 4 furthest edges that can be reached from the current position for each queen (while accounting for tiles that have been hit by arrows). That means each each queen has 8 pointers that are [x, y] pairs associated with it. When a queen makes a move, we need to update all 8 pointers by running a linear search until the edge of the board (or a burned tile) in a clockwise direction. We do this every time we need to make a move, as the board will be updated after the opponent makes a move
  • After the Amazon moves, it needs to fire an arrow. The arrow can also move like a chess queen. The square where the arrow lands is burned off the board. That square cannot be occupied and no amazon can go past it (jump over it)
    • Technical considerations: the above legal moves check algorithm would account for burned tiles
  • The game ends when the opponent cannot move anywhere anymore. That player who is unable to move is the player that loses. OR the player who did the last legal move is the winner (if both of you end up being stuck, then the the player who last made a move wins)
@ColinLefter ColinLefter added the documentation Improvements or additions to documentation label Mar 12, 2024
@ColinLefter ColinLefter pinned this issue Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants