コード例 #1
0
ファイル: RubiksCube.cs プロジェクト: ulfk/rubiks-cube
        private void Rotate(string identifier)
        {
            var movement = MovementRepository.Get(identifier) ?? throw new Exception($"Unknown rotation: {identifier}");

            DoRotation(movement);
        }
コード例 #2
0
ファイル: RubiksCube.cs プロジェクト: ulfk/rubiks-cube
        public void Rotate(CubeSlice slice, MoveDirection direction = MoveDirection.Single)
        {
            var movement = MovementRepository.Get(slice, direction) ?? throw new Exception($"Unknown rotation: {slice} {direction}");

            DoRotation(movement);
        }
コード例 #3
0
 private MovementRepository()
 {
     _movementRepository = this;
 }