public Boolean HasEaten() { Theseus theseus = myGame.GetTheseus(); if (Coordinate == theseus.Coordinate) { return(true); } return(false); }
protected void SetCharacters(int theMap) { switch (theMap) { case 1: minotaur = SetMinotaur(1, 0); theseus = SetTheseus(1, 2); break; case 2: theseus = SetTheseus(2, 1); minotaur = SetMinotaur(0, 1); break; case 3: theseus = SetTheseus(1, 1); minotaur = SetMinotaur(1, 0); break; case 4: theseus = SetTheseus(1, 1); minotaur = SetMinotaur(4, 2); break; case 5: theseus = SetTheseus(2, 1); minotaur = SetMinotaur(2, 4); break; case 6: theseus = SetTheseus(0, 1); minotaur = SetMinotaur(4, 3); break; case 7: theseus = SetTheseus(4, 5); minotaur = SetMinotaur(0, 5); break; case 9: theseus = SetTheseus(1, 1); minotaur = SetMinotaur(3, 2); break; default: break; } }
public void Hunt() { Theseus theseus = myGame.GetTheseus(); for (int i = 0; i < 2; i++) { Console.WriteLine("M turn " + (i + 1)); // if minotaur's X value isn't the same as theseus' if (Coordinate.X != theseus.Coordinate.X) { HuntHorizontal(); } else if (Coordinate.X == theseus.Coordinate.X) { HuntVertical(); } } }
protected void HuntVertical() { Theseus theseus = myGame.GetTheseus(); if (Coordinate.Y > theseus.Coordinate.Y) { if (!Move(Direction.Up)) { Console.WriteLine("blocked"); } } if (Coordinate.Y < theseus.Coordinate.Y) { if (!Move(Direction.Down)) { Console.WriteLine("blocked"); } } }
protected void HuntHorizontal() { Theseus theseus = myGame.GetTheseus(); // if Theseus is to the left if (Coordinate.X > theseus.Coordinate.X) { if (!Move(Direction.Left)) { HuntVertical(); } } if (Coordinate.X < theseus.Coordinate.X) { if (!Move(Direction.Right)) { HuntVertical(); } } }
public void SetTestCharacters(int testMap) { switch (testMap) { case 1: theseus = SetTheseus(1, 1); minotaur = SetMinotaur(3, 1); break; case 2: theseus = SetTheseus(3, 0); minotaur = SetMinotaur(0, 0); break; case 3: theseus = SetTheseus(3, 0); minotaur = SetMinotaur(0, 0); break; default: break; } }
protected Theseus SetTheseus(int newX, int newY) { theseus = new Theseus(newX, newY); return(theseus); }
public void SetTheseus(Theseus newTheseus) { theseus = newTheseus; theseus.SetGame(this); }
protected Theseus SetTheseus(int newX, int newY) { theseus = new Theseus(newX, newY); return theseus; }