Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename repo #283

Merged
merged 17 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "dotnet restore src/Battle.sln",
"postCreateCommand": "dotnet restore src/TBE.sln",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ jobs:
with:
dotnet-version: 6.0.x
- name: Run automated tests
run: dotnet test src/Battle.Tests/Battle.Tests.csproj --configuration Debug --logger trx -e:CollectCoverage=true -e:CoverletOutput=TestResults/ -e:CoverletOutputFormat=lcov --settings:./src/Battle.Tests/CodeCoverage.runsettings
run: dotnet test src/TBE.Tests/TBE.Tests.csproj --configuration Debug --logger trx -e:CollectCoverage=true -e:CoverletOutput=TestResults/ -e:CoverletOutputFormat=lcov --settings:./src/TBE.Tests/CodeCoverage.runsettings
- name: Publish coverage report to coveralls.io
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: src/Battle.Tests/TestResults/coverage.info
path-to-lcov: src/TBE.Tests/TestResults/coverage.info
continue-on-error: true
- name: Build code in debug
run: dotnet build src/Battle.Logic/Battle.Logic.csproj --configuration Debug -p:Version='${{ steps.gitversion.outputs.SemVer }}'
run: dotnet build src/TBE.Logic/TBE.Logic.csproj --configuration Debug -p:Version='${{ steps.gitversion.outputs.SemVer }}'
- name: Pack code into NuGet package in release
run: dotnet pack src/Battle.Logic/Battle.Logic.csproj --configuration Debug -p:Version='${{ steps.gitversion.outputs.SemVer }}'
run: dotnet pack src/TBE.Logic/TBE.Logic.csproj --configuration Debug -p:Version='${{ steps.gitversion.outputs.SemVer }}'
- name: Upload package to GitHub
uses: actions/upload-artifact@v3
with:
name: package
path: src/Battle.Logic/bin/Debug/netstandard2.0
path: src/TBE.Logic/bin/Debug/netstandard2.0
- name: Upload nuget package to GitHub
uses: actions/upload-artifact@v3
with:
name: nugetPackage
path: src/Battle.Logic/bin/Debug/
path: src/TBE.Logic/bin/Debug/


sonarCloud:
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Run Sonarcloud test
uses: samsmithnz/SamsDotNetSonarCloudAction@1.2.0
with:
projects: 'src/Battle.Logic/Battle.Logic.csproj'
projects: 'src/TBE.Logic/TBE.Logic.csproj'
dotnet-version: '7.0.x'
sonarcloud-organization: samsmithnz-github
sonarcloud-project: samsmithnz_Battle
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Battle.Tests/bin/Debug/netcoreapp3.1/Battle.Tests.dll",
"program": "${workspaceFolder}/src/TBE.Tests/bin/Debug/netcoreapp3.1/TBE.Tests.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Battle.Tests",
"cwd": "${workspaceFolder}/src/TBE.Tests",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
Expand All @@ -23,4 +23,4 @@
"request": "attach"
}
]
}
}
8 changes: 4 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Battle.Tests/Battle.Tests.csproj",
"${workspaceFolder}/src/TBE.Tests/TBE.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -19,7 +19,7 @@
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/Battle.Tests/Battle.Tests.csproj",
"${workspaceFolder}/src/TBE.Tests/TBE.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
Expand All @@ -32,11 +32,11 @@
"args": [
"watch",
"run",
"${workspaceFolder}/src/Battle.Tests/Battle.Tests.csproj",
"${workspaceFolder}/src/TBE.Tests/TBE.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
}
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
next-version: 1.0.0
next-version: 1.1.0
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Battle
A POC to build the battle logic for a turn based game idea, similar to [XCOM](https://en.wikipedia.org/wiki/XCOM) and [Jagged Alliance](https://en.wikipedia.org/wiki/Jagged_Alliance_(series)).
# Turn Based Engine (TBE)
A project that builds out the logic for a turn based engine/ game idea, similar to [XCOM](https://en.wikipedia.org/wiki/XCOM) and [Jagged Alliance](https://en.wikipedia.org/wiki/Jagged_Alliance_(series)).

[![.NET Build](https://github.com/samsmithnz/Battle/actions/workflows/dotnet.yml/badge.svg)](https://github.com/samsmithnz/Battle/actions/workflows/dotnet.yml)
[![.NET Build](https://github.com/samsmithnz/TurnBasedEngine/actions/workflows/dotnet.yml/badge.svg)](https://github.com/samsmithnz/TurnBasedEngine/actions/workflows/dotnet.yml)
[![Coverage Status](https://coveralls.io/repos/github/samsmithnz/Battle/badge.svg?branch=main)](https://coveralls.io/github/samsmithnz/Battle?branch=main)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=samsmithnz_Battle&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=samsmithnz_Battle)
[![Current Release](https://img.shields.io/github/release/samsmithnz/Battle/all.svg)](https://github.com/samsmithnz/Battle/releases)
[![Current Release](https://img.shields.io/github/release/samsmithnz/TurnBasedEngine/all.svg)](https://github.com/samsmithnz/TurnBasedEngine/releases)

### Current features include:
- Basic map generation, in 2d world, with x and z axis (y axis to come later)
Expand Down Expand Up @@ -36,9 +36,9 @@ A POC to build the battle logic for a turn based game idea, similar to [XCOM](ht

## How to install/use
- Requires .NET 7 (for tests)
- Battle.Logic dll is .NET Standard 2.0 for Unity compatibility
- TBE.Logic dll is .NET Standard 2.0 for Unity compatibility
- Codespaces is configured, or you can continue to use Visual Studio
- See tests & scenarios for examples of how to utilize the battle.logic
- See tests & scenarios for examples of how to utilize the TBE.Logic project

## Contributions
- Contributions welcome! Fork/Issue/Pull Request. Whatever you are comfortable suggesting.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.AbilitiesAndEffects
namespace TBE.Logic.AbilitiesAndEffects
{
public class Ability
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.AbilitiesAndEffects
namespace TBE.Logic.AbilitiesAndEffects
{
public enum AbilityType
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.AbilitiesAndEffects
namespace TBE.Logic.AbilitiesAndEffects
{
public static class AbilityPool
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.AbilitiesAndEffects
namespace TBE.Logic.AbilitiesAndEffects
{
public class Effect
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Battle.Logic.AbilitiesAndEffects;
using Battle.Logic.Items;
using Battle.Logic.Map;
using TBE.Logic.AbilitiesAndEffects;
using TBE.Logic.Items;
using TBE.Logic.Map;
using System.Collections.Generic;
using System.Numerics;

namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public class Character
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Battle.Logic.Encounters;
using Battle.Logic.Game;
using Battle.Logic.Map;
using Battle.Logic.Utility;
using TBE.Logic.Encounters;
using TBE.Logic.Game;
using TBE.Logic.Map;
using TBE.Logic.Utility;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public class CharacterAI
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public class CharacterAction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Battle.Logic.Game;
using Battle.Logic.Map;
using TBE.Logic.Game;
using TBE.Logic.Map;
using System;
using System.Collections.Generic;
using System.Numerics;

namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public static class CharacterCover
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Battle.Logic.Encounters;
using Battle.Logic.Game;
using Battle.Logic.Map;
using Battle.Logic.Utility;
using TBE.Logic.Encounters;
using TBE.Logic.Game;
using TBE.Logic.Map;
using TBE.Logic.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;

namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public static class CharacterMovement
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Battle.Logic.AbilitiesAndEffects;
using Battle.Logic.Items;
using TBE.Logic.AbilitiesAndEffects;
using TBE.Logic.Items;
using System.Numerics;

namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public static class CharacterPool
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public class CoverState
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.Characters
namespace TBE.Logic.Characters
{
public static class Experience
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Numerics;
using System.Text;

namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{
public class AIAction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{
public class DamageRange
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Battle.Logic.AbilitiesAndEffects;
using Battle.Logic.Characters;
using Battle.Logic.Items;
using Battle.Logic.Map;
using Battle.Logic.Utility;
using TBE.Logic.AbilitiesAndEffects;
using TBE.Logic.Characters;
using TBE.Logic.Items;
using TBE.Logic.Map;
using TBE.Logic.Utility;
using System.Collections.Generic;
using System.Numerics;
using System.Text;

namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{
public static class Encounter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Battle.Logic.AbilitiesAndEffects;
using Battle.Logic.Characters;
using Battle.Logic.Items;
using TBE.Logic.AbilitiesAndEffects;
using TBE.Logic.Characters;
using TBE.Logic.Items;
using System.Collections.Generic;
using System.Numerics;

namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{
public static class EncounterCore
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Battle.Logic.Characters;
using TBE.Logic.Characters;
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Text;

namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{
public class EncounterResult
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Numerics;

namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{
public class MovementAction
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Battle.Logic.Items;
using TBE.Logic.Items;
using System.Numerics;

namespace Battle.Logic.Encounters
namespace TBE.Logic.Encounters
{

//Largely sourced from here: https://www.ufopaedia.org/index.php/Chance_to_Hit_(EU2012)#Weapon_Range
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Battle.Logic.Characters;
using Battle.Logic.Encounters;
using Battle.Logic.Items;
using Battle.Logic.Map;
using Battle.Logic.Utility;
using TBE.Logic.Characters;
using TBE.Logic.Encounters;
using TBE.Logic.Items;
using TBE.Logic.Map;
using TBE.Logic.Utility;
using System;
using System.Collections.Generic;
using System.Numerics;

namespace Battle.Logic.Game
namespace TBE.Logic.Game
{
public class Mission
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Numerics;

namespace Battle.Logic.Game
namespace TBE.Logic.Game
{
public class MissionObjective
{
Expand Down
4 changes: 2 additions & 2 deletions src/Battle.Logic/Game/Team.cs → src/TBE.Logic/Game/Team.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Battle.Logic.Characters;
using TBE.Logic.Characters;
using System.Collections.Generic;
using System.Numerics;

namespace Battle.Logic.Game
namespace TBE.Logic.Game
{
public class Team
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Battle.Logic.Characters;
using Battle.Logic.Utility;
using TBE.Logic.Characters;
using TBE.Logic.Utility;
using System.Collections.Generic;

namespace Battle.Logic.Game
namespace TBE.Logic.Game
{
public static class TeamUtility
{
Expand Down
Loading