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

Re-write FEEngine from the ground up #2

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b2073b5
start rebuild
heyallnorahere Feb 13, 2022
f78d1b7
setup assemblies
heyallnorahere Feb 13, 2022
e754d59
set up map and unit classes, and add tests
heyallnorahere Feb 13, 2022
fd21c37
add testing workflow
heyallnorahere Feb 13, 2022
faf286b
adding of units
heyallnorahere Feb 13, 2022
803557d
add action thingy
heyallnorahere Feb 14, 2022
71e6619
add .net 5 configuration
heyallnorahere Feb 15, 2022
37778a1
whoops
heyallnorahere Feb 15, 2022
456df8d
again, whoops
heyallnorahere Feb 15, 2022
edc31e9
okay
heyallnorahere Feb 15, 2022
a6dfd5c
add items
heyallnorahere Feb 15, 2022
54c4c93
prototypes
heyallnorahere Feb 16, 2022
445aa7a
fix build errors
heyallnorahere Feb 16, 2022
87d599e
add weapons
heyallnorahere Feb 17, 2022
86dce78
add unit stats
heyallnorahere Feb 17, 2022
33ac799
start combat engine
heyallnorahere Feb 21, 2022
9aef66b
combat calculations, kind of
heyallnorahere Mar 3, 2022
c1eb787
mostly finish combat engine, manifest item parser
heyallnorahere Mar 7, 2022
df2d2f8
true hit
heyallnorahere Mar 7, 2022
fd1c154
attack map action
heyallnorahere Mar 10, 2022
9c38c55
usable item action
heyallnorahere Mar 10, 2022
6febaf0
start commandline implementation for testing
heyallnorahere Mar 10, 2022
da3d97c
map deserializer
heyallnorahere Mar 13, 2022
c290d61
add archer unit for combat tests
heyallnorahere Mar 13, 2022
5c4bfe2
renderer :D
heyallnorahere Mar 13, 2022
d42934b
ui stuff
heyallnorahere Mar 13, 2022
6d0f8c1
add border to borderlayout
heyallnorahere Mar 14, 2022
84b662d
border characters
heyallnorahere Mar 14, 2022
02cbae8
update things
heyallnorahere Mar 14, 2022
6624018
map view and cursor
heyallnorahere Mar 14, 2022
b9b7fb9
units displayed on the map view
heyallnorahere Mar 17, 2022
173d1af
map scrolling
heyallnorahere Mar 17, 2022
cc5f597
add placeholder characters for empty spots and update readme
heyallnorahere Mar 17, 2022
bcb2764
game console
heyallnorahere Mar 18, 2022
0890013
game console view!
heyallnorahere Mar 18, 2022
21f398d
remove unnecessary callback
heyallnorahere Mar 18, 2022
01a7962
map load command
heyallnorahere Mar 18, 2022
bc340fd
phases :)
heyallnorahere Mar 19, 2022
e3612e5
undoing of actions
heyallnorahere Mar 19, 2022
92274f9
start unit command and game console scrolling
heyallnorahere Mar 20, 2022
a09d15e
console scrolling
heyallnorahere Jun 6, 2022
ec68feb
fix console bug
heyallnorahere Jun 9, 2022
aa32e1e
create custom textwriter implementation
heyallnorahere Aug 7, 2022
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
52 changes: 0 additions & 52 deletions .github/workflows/build.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: test
on: [ push ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: set up dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: build
shell: bash
run: |
dotnet restore
dotnet build -c Release
- name: test
shell: bash
run: |
dotnet test -c Release
24 changes: 5 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
#!.vscode/settings.json
#!.vscode/tasks.json
#!.vscode/launch.json
#!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
Expand Down Expand Up @@ -585,18 +585,4 @@ obj/
### VisualStudio Patch ###
# Additional files built by Visual Studio

# End of https://www.toptal.com/developers/gitignore/api/csharp,dotnetcore,visualstudiocode,visualstudio

# key bindings
bindings.json

# generated schemas
schemas/

# copied game binaries
Games/

# fnalibs
fnalibs-build/
*.dylib
*.dll
# End of https://www.toptal.com/developers/gitignore/api/csharp,dotnetcore,visualstudiocode,visualstudio
12 changes: 0 additions & 12 deletions .gitmodules

This file was deleted.

21 changes: 0 additions & 21 deletions .vscode/launch.json

This file was deleted.

40 changes: 0 additions & 40 deletions .vscode/settings.json

This file was deleted.

17 changes: 0 additions & 17 deletions .vscode/tasks.json

This file was deleted.

10 changes: 10 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
36 changes: 36 additions & 0 deletions FEEngine.Cmdline/ClientData/MapClientData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Copyright 2022 Nora Beda

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

using Newtonsoft.Json;

namespace FEEngine.Cmdline.ClientData
{
[JsonObject(MissingMemberHandling = MissingMemberHandling.Error)]
public sealed class MapClientData : IMapClientData
{
public MapClientData()
{
PhaseManager = new PhaseManager();
}

internal void SetMap(IMap map) => PhaseManager.SetMap(map);

public PhaseManager PhaseManager { get; set; }

[JsonIgnore]
public bool IsValid => true;
}
}
45 changes: 45 additions & 0 deletions FEEngine.Cmdline/ClientData/UnitClientData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Copyright 2022 Nora Beda

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

using Newtonsoft.Json;
using System.Collections.Generic;

namespace FEEngine.Cmdline.ClientData
{
public enum ClientActionID
{
Move,
Item,
Wait,
Attack
}

[JsonObject(MissingMemberHandling = MissingMemberHandling.Error)]
public sealed class UnitClientData : IUnitClientData
{
public UnitClientData()
{
PhaseActions = new List<ClientActionID>();
}

public Allegiance Allegiance { get; set; }
public bool HasMoved { get; set; }
public List<ClientActionID> PhaseActions { get; set; }

[JsonIgnore]
public bool IsValid => true;
}
}
Loading