Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Square
- {
- public int x;
- public int y;
- public int height = -1;
- public bool IsAdjacent(Square s)
- {
- if((s.x - x == 1 || s.x - x == -1 || s.x - x == 0) &&
- (s.y - y == 1 || s.y - y == -1 || s.y - y == 0))
- return true;
- else
- return false;
- }
- }
- public class Action
- {
- public string type;
- public int index;
- public string move;
- public string build;
- public double score;
- public Square moveFrom;
- public Square moveTo; // pushed square
- public Square buildAt; // pushed to
- public override string ToString()
- {
- return type + " " + index + " " + move + " " + build;
- }
- public void Evaluate()
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement