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.Collections.Generic;
 | 
				
			||||||
using System.Linq;
 | 
					using System.Linq;
 | 
				
			||||||
using Microsoft.Xna.Framework;
 | 
					using Microsoft.Xna.Framework;
 | 
				
			||||||
using Microsoft.Xna.Framework.Graphics;
 | 
					 | 
				
			||||||
using SeeNoEvil.Character;
 | 
					 | 
				
			||||||
using SeeNoEvil.Tiled;
 | 
					using SeeNoEvil.Tiled;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace SeeNoEvil.Level {
 | 
					namespace SeeNoEvil.Level {
 | 
				
			||||||
    public class PlayField {
 | 
					    public class PlayField {
 | 
				
			||||||
		private IEnumerable<TileLocation> Tiles {get; set;}
 | 
					        private IEnumerable<TileLocation> Tiles {get; set;}
 | 
				
			||||||
		
 | 
					        
 | 
				
			||||||
		public PlayField(IEnumerable<TileLocation> tiles) {
 | 
					        public PlayField(IEnumerable<TileLocation> tiles) {
 | 
				
			||||||
			Tiles = tiles;
 | 
					            Tiles = tiles;
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public bool TryWalk(Vector2 newLocation) =>
 | 
					        public bool TryWalk(Vector2 newLocation) =>
 | 
				
			||||||
			Tiles.Any(tile => tile.location.Equals(newLocation) && tile.tile.gid != 0);
 | 
					            Tiles.Any(tile => tile.location.Equals(newLocation) && tile.tile.gid != 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		private bool Between(float pos1, float pos2, float bound) =>
 | 
					        private bool Between(float pos1, float pos2, float bound) =>
 | 
				
			||||||
			(bound - pos1) >= (pos2 - pos1);
 | 
					            (bound - pos1) >= (pos2 - pos1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,36 +1,36 @@
 | 
				
			|||||||
using Microsoft.Xna.Framework;
 | 
					using Microsoft.Xna.Framework;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace SeeNoEvil.Tiled {
 | 
					namespace SeeNoEvil.Tiled {
 | 
				
			||||||
	public struct Tile {
 | 
					    public struct Tile {
 | 
				
			||||||
		public Tile(long _gid, Rectangle _srcRectangle, string _setName) {
 | 
					        public Tile(long _gid, Rectangle _srcRectangle, string _setName) {
 | 
				
			||||||
			gid = (uint)_gid;
 | 
					            gid = (uint)_gid;
 | 
				
			||||||
			srcRectangle = _srcRectangle;
 | 
					            srcRectangle = _srcRectangle;
 | 
				
			||||||
			setName = _setName;
 | 
					            setName = _setName;
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
		public uint gid;
 | 
					        public uint gid;
 | 
				
			||||||
		public Rectangle srcRectangle;
 | 
					        public Rectangle srcRectangle;
 | 
				
			||||||
		public string setName;
 | 
					        public string setName;
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public struct TileLocation {
 | 
					    public struct TileLocation {
 | 
				
			||||||
        public TileLocation(Tile tile, Vector2 location) {
 | 
					        public TileLocation(Tile tile, Vector2 location) {
 | 
				
			||||||
            this.tile = tile;
 | 
					            this.tile = tile;
 | 
				
			||||||
            this.location = location;
 | 
					            this.location = location;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public Tile tile;
 | 
					        public Tile tile;
 | 
				
			||||||
		public Vector2 location;
 | 
					        public Vector2 location;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public struct DataCoordinate {
 | 
					    public struct DataCoordinate {
 | 
				
			||||||
		public DataCoordinate(int _x, int _y, uint _gid) {
 | 
					        public DataCoordinate(int _x, int _y, uint _gid) {
 | 
				
			||||||
			x = _x;
 | 
					            x = _x;
 | 
				
			||||||
			y = _y;
 | 
					            y = _y;
 | 
				
			||||||
			gid = _gid;
 | 
					            gid = _gid;
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public int x;
 | 
					        public int x;
 | 
				
			||||||
		public int y;
 | 
					        public int y;
 | 
				
			||||||
		public uint gid;
 | 
					        public uint gid;
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue