예제 #1
0
파일: Snake.cs 프로젝트: DantesFonCake/Game
 public Snake(GameModel game, Kaba kaba, Hiro hiro, Hana hana, Naru naru)
 {
     Kaba = kaba;
     Hiro = hiro;
     Hana = hana;
     Naru = naru;
     Game = game;
 }
예제 #2
0
파일: Snake.cs 프로젝트: DantesFonCake/Game
 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;
 }
예제 #3
0
파일: Snake.cs 프로젝트: DantesFonCake/Game
        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);
        }