Compare commits
2 Commits
master
...
30793101df
| Author | SHA1 | Date | |
|---|---|---|---|
| 30793101df | |||
| a1877e7ddb |
@@ -1,4 +1,3 @@
|
|||||||
/*
|
|
||||||
public interface IAction
|
public interface IAction
|
||||||
{
|
{
|
||||||
void GetAction(Character character);
|
void GetAction(Character character);
|
||||||
@@ -7,9 +6,8 @@ public interface IAction
|
|||||||
void HealthPotion();
|
void HealthPotion();
|
||||||
Item Items();
|
Item Items();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
public sealed class Actions //: IAction
|
public sealed class Actions : IAction
|
||||||
{
|
{
|
||||||
private static readonly Lazy<Actions> _instance = new Lazy<Actions>(() => new Actions());
|
private static readonly Lazy<Actions> _instance = new Lazy<Actions>(() => new Actions());
|
||||||
private Actions() { }
|
private Actions() { }
|
||||||
@@ -20,13 +18,11 @@ public sealed class Actions //: IAction
|
|||||||
|
|
||||||
public void GetAction(Character character)
|
public void GetAction(Character character)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
switch (MenuItem.Description)
|
switch (MenuItem.Description)
|
||||||
{
|
{
|
||||||
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ public abstract class Character
|
|||||||
public bool dead {get; set;} = false;
|
public bool dead {get; set;} = false;
|
||||||
public string turnMarker = "*";
|
public string turnMarker = "*";
|
||||||
public bool isTurn {get; set;} = false;
|
public bool isTurn {get; set;} = false;
|
||||||
//public List<Actions>CharacterEnabledActions = new List<Actions>();
|
public List<string>CharacterEnabledActions = new List<string>();
|
||||||
}
|
}
|
||||||
|
|||||||
10
GameState.cs
10
GameState.cs
@@ -17,7 +17,6 @@ public sealed class GameState
|
|||||||
public bool monstersAIControl = true;
|
public bool monstersAIControl = true;
|
||||||
public bool lastRound = false;
|
public bool lastRound = false;
|
||||||
|
|
||||||
/*
|
|
||||||
public record MenuItem
|
public record MenuItem
|
||||||
{
|
{
|
||||||
string? Description;
|
string? Description;
|
||||||
@@ -25,12 +24,15 @@ public sealed class GameState
|
|||||||
IAction? ActionToPerform;
|
IAction? ActionToPerform;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildMenu()
|
public void BuildMenu(Character character)
|
||||||
{
|
{
|
||||||
foreach (action in Character.EnabledActions)
|
|
||||||
int number = 1;
|
int number = 1;
|
||||||
|
foreach (string action in character.CharacterEnabledActions)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{number}. {action}");
|
||||||
|
number++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ public class Player : Character
|
|||||||
maxHP = 10;
|
maxHP = 10;
|
||||||
currentHP = maxHP;
|
currentHP = maxHP;
|
||||||
name = GetName();
|
name = GetName();
|
||||||
//List<IherosAction>CharacterEnabledActions = new List<IAction>();
|
CharacterEnabledActions.AddRange("Do Nothing", "Attack", "Items");
|
||||||
//CharacterEnabledActions.Add(Actions.Instance.DoNothing()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("FinalBattle")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("FinalBattle")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a1877e7ddb649a0bfdd178b7542ad52b6dca820e")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("FinalBattle")]
|
[assembly: System.Reflection.AssemblyProductAttribute("FinalBattle")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("FinalBattle")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("FinalBattle")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
15175f65f6f63f0c4c3ae8d13187889e73fe451b685fbc2643b44dd8e1084a87
|
c09c7b260214ced4ad1f8ef7f9de63fcbf763c569ec3ad6b676dfa19cb5cf7fc
|
||||||
|
|||||||
Reference in New Issue
Block a user