Skip to content

Commit

Permalink
Added classes for all tile types
Browse files Browse the repository at this point in the history
  • Loading branch information
SWY1985 committed May 20, 2015
1 parent fc078c8 commit e8fb7bc
Show file tree
Hide file tree
Showing 13 changed files with 284 additions and 0 deletions.
1 change: 1 addition & 0 deletions CivOne.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<Compile Include="src\IO\*.cs" />
<Compile Include="src\Screens\*.cs" />
<Compile Include="src\Templates\*.cs" />
<Compile Include="src\Tiles\*.cs" />
<Compile Include="src\*.cs" />
</ItemGroup>
<Target Name="Build">
Expand Down
23 changes: 23 additions & 0 deletions src/Tiles/Arctic.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Arctic : BaseTile
{
public Arctic(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Arctic;
Name = "Arctic";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Desert.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Desert : BaseTile
{
public Desert(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Desert;
Name = "Desert";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Forest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Forest : BaseTile
{
public Forest(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Forest;
Name = "Forest";
}
}
}
30 changes: 30 additions & 0 deletions src/Tiles/Grassland.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Grassland : BaseTile
{
private Terrain CalculateTileType()
{
if ((((X * 7) + (Y * 11)) & 0x02) == 0)
return Terrain.Grassland2;
return Terrain.Grassland1;
}

public Grassland(int x, int y) : base(x, y, false)
{
Type = CalculateTileType();
Name = "Grassland";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Hills.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Hills : BaseTile
{
public Hills(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Hills;
Name = "Hills";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Jungle.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Jungle : BaseTile
{
public Jungle(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Jungle;
Name = "Jungle";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Mountains.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Mountains : BaseTile
{
public Mountains(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Mountains;
Name = "Mountains";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Ocean.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Ocean : BaseTile
{
public Ocean(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Ocean;
Name = "Ocean";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Plains.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Plains : BaseTile
{
public Plains(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Plains;
Name = "Plains";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/River.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class River : BaseTile
{
public River(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.River;
Name = "River";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Swamp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Swamp : BaseTile
{
public Swamp(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Swamp;
Name = "Swamp";
}
}
}
23 changes: 23 additions & 0 deletions src/Tiles/Tundra.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

using CivOne.Enums;
using CivOne.Templates;

namespace CivOne.Tiles
{
internal class Tundra : BaseTile
{
public Tundra(int x, int y, bool special) : base(x, y, special)
{
Type = Terrain.Tundra;
Name = "Tundra";
}
}
}

0 comments on commit e8fb7bc

Please sign in to comment.