Esempio n. 1
0
 private void Select()
 {
     _selectCoords =
         _facing == Up
         ? GetNewCoords(Negative, Static)
         : _facing == Right
         ? GetNewCoords(Static, Positive)
         : _facing == Down
         ? GetNewCoords(Positive, Static)
         : GetNewCoords(Static, Negative);
 }
Esempio n. 2
0
        private void Move(Func <int, int> changeRow, Func <int, int> changeCol)
        {
            var coords  = GetNewCoords(changeRow, changeCol);
            var feature = _crypt[coords];

            if (feature.CanPlaceToken(this))
            {
                _crypt.RemoveGameToken(_cryptCoords);
                _cryptCoords = coords;
                _crypt.PlaceGameToken(_cryptCoords, this);
                Select();
            }
        }
Esempio n. 3
0
 public Player(Crypt crypt, Crypt.Coords cryptCoords) : base("Sprites/Player")
 {
     _crypt       = crypt;
     _cryptCoords = cryptCoords;
     Face(Up);
 }