Fix indentation so it looks okay on GitHub
							parent
							
								
									ff84687bc9
								
							
						
					
					
						commit
						531ffbf531
					
				@ -1,19 +0,0 @@
 | 
			
		||||
<Project Sdk="Microsoft.NET.Sdk">
 | 
			
		||||
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <TargetFramework>netcoreapp3.1</TargetFramework>
 | 
			
		||||
 | 
			
		||||
    <IsPackable>false</IsPackable>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <PackageReference Include="nunit" Version="3.12.0" />
 | 
			
		||||
    <PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
 | 
			
		||||
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0"/>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ProjectReference Include="../SeeNoEvil/SeeNoEvil.csproj" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
</Project>
 | 
			
		||||
@ -1,18 +0,0 @@
 | 
			
		||||
using NUnit.Framework;
 | 
			
		||||
 | 
			
		||||
namespace SeeNoEvil.Tests
 | 
			
		||||
{
 | 
			
		||||
    public class Tests
 | 
			
		||||
    {
 | 
			
		||||
        [SetUp]
 | 
			
		||||
        public void Setup()
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [Test]
 | 
			
		||||
        public void Test1()
 | 
			
		||||
        {
 | 
			
		||||
            Assert.Pass();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1,23 +1,20 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Microsoft.Xna.Framework;
 | 
			
		||||
using Microsoft.Xna.Framework.Graphics;
 | 
			
		||||
using SeeNoEvil.Character;
 | 
			
		||||
using SeeNoEvil.Tiled;
 | 
			
		||||
 | 
			
		||||
namespace SeeNoEvil.Level {
 | 
			
		||||
    public class PlayField {
 | 
			
		||||
		private IEnumerable<TileLocation> Tiles {get; set;}
 | 
			
		||||
        private IEnumerable<TileLocation> Tiles {get; set;}
 | 
			
		||||
        
 | 
			
		||||
		public PlayField(IEnumerable<TileLocation> tiles) {
 | 
			
		||||
			Tiles = tiles;
 | 
			
		||||
		}
 | 
			
		||||
        public PlayField(IEnumerable<TileLocation> tiles) {
 | 
			
		||||
            Tiles = tiles;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		public bool TryWalk(Vector2 newLocation) =>
 | 
			
		||||
			Tiles.Any(tile => tile.location.Equals(newLocation) && tile.tile.gid != 0);
 | 
			
		||||
        public bool TryWalk(Vector2 newLocation) =>
 | 
			
		||||
            Tiles.Any(tile => tile.location.Equals(newLocation) && tile.tile.gid != 0);
 | 
			
		||||
 | 
			
		||||
		private bool Between(float pos1, float pos2, float bound) =>
 | 
			
		||||
			(bound - pos1) >= (pos2 - pos1);
 | 
			
		||||
        private bool Between(float pos1, float pos2, float bound) =>
 | 
			
		||||
            (bound - pos1) >= (pos2 - pos1);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1,36 +1,36 @@
 | 
			
		||||
using Microsoft.Xna.Framework;
 | 
			
		||||
 | 
			
		||||
namespace SeeNoEvil.Tiled {
 | 
			
		||||
	public struct Tile {
 | 
			
		||||
		public Tile(long _gid, Rectangle _srcRectangle, string _setName) {
 | 
			
		||||
			gid = (uint)_gid;
 | 
			
		||||
			srcRectangle = _srcRectangle;
 | 
			
		||||
			setName = _setName;
 | 
			
		||||
		}
 | 
			
		||||
		public uint gid;
 | 
			
		||||
		public Rectangle srcRectangle;
 | 
			
		||||
		public string setName;
 | 
			
		||||
	}
 | 
			
		||||
    public struct Tile {
 | 
			
		||||
        public Tile(long _gid, Rectangle _srcRectangle, string _setName) {
 | 
			
		||||
            gid = (uint)_gid;
 | 
			
		||||
            srcRectangle = _srcRectangle;
 | 
			
		||||
            setName = _setName;
 | 
			
		||||
        }
 | 
			
		||||
        public uint gid;
 | 
			
		||||
        public Rectangle srcRectangle;
 | 
			
		||||
        public string setName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	public struct TileLocation {
 | 
			
		||||
    public struct TileLocation {
 | 
			
		||||
        public TileLocation(Tile tile, Vector2 location) {
 | 
			
		||||
            this.tile = tile;
 | 
			
		||||
            this.location = location;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		public Tile tile;
 | 
			
		||||
		public Vector2 location;
 | 
			
		||||
        public Tile tile;
 | 
			
		||||
        public Vector2 location;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	public struct DataCoordinate {
 | 
			
		||||
		public DataCoordinate(int _x, int _y, uint _gid) {
 | 
			
		||||
			x = _x;
 | 
			
		||||
			y = _y;
 | 
			
		||||
			gid = _gid;
 | 
			
		||||
		}
 | 
			
		||||
    public struct DataCoordinate {
 | 
			
		||||
        public DataCoordinate(int _x, int _y, uint _gid) {
 | 
			
		||||
            x = _x;
 | 
			
		||||
            y = _y;
 | 
			
		||||
            gid = _gid;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		public int x;
 | 
			
		||||
		public int y;
 | 
			
		||||
		public uint gid;
 | 
			
		||||
	}
 | 
			
		||||
        public int x;
 | 
			
		||||
        public int y;
 | 
			
		||||
        public uint gid;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue