private void Select() { _selectCoords = _facing == Up ? GetNewCoords(Negative, Static) : _facing == Right ? GetNewCoords(Static, Positive) : _facing == Down ? GetNewCoords(Positive, Static) : GetNewCoords(Static, Negative); }
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(); } }
public Player(Crypt crypt, Crypt.Coords cryptCoords) : base("Sprites/Player") { _crypt = crypt; _cryptCoords = cryptCoords; Face(Up); }