public Snake(GameModel game, Kaba kaba, Hiro hiro, Hana hana, Naru naru) { Kaba = kaba; Hiro = hiro; Hana = hana; Naru = naru; Game = 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; }
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); }