Exemple #1
0
 public Snake(GameModel game, Kaba kaba, Hiro hiro, Hana hana, Naru naru)
 {
     Kaba = kaba;
     Hiro = hiro;
     Hana = hana;
     Naru = naru;
     Game = game;
 }
Exemple #2
0
 public Snake(GameModel game, Point kabaPosition, Point hiroPosition, Point hanaPosition, Point naruPosition)
 {
     Kaba = new Kaba(game, kabaPosition);
     Hiro = new Hiro(game, hiroPosition);
     Hana = new Hana(game, hanaPosition);
     Naru = new Naru(game, naruPosition);
     Game = game;
 }
Exemple #3
0
        public void MoveInDirection(Direction direction)
        {
            var previousPosition = Kaba.Position;

            Kaba.Move(direction);
            var oldHiroPosition = Hiro.Position;

            Hiro.MoveTo(previousPosition, true);
            var oldHanaPosition = Hana.Position;

            Hana.MoveTo(oldHiroPosition, true);
            Naru.MoveTo(oldHanaPosition, true);
        }