malikhollins / HungerGamesSimulator

A hunger games simulator built using the .net blazor framework
0 stars 1 forks source link

Hunger Games Simulator

A project created to get experience with Blazor, ASP.NET, C#, Testing, and Reflection. I started and will finish this product for Q4. In the project, I use testing suites to ensure functionality before implementing into the codebase.

Creating Designer Strings

Basic Service.json Template

[ 
  {
    "Contexts": [ "Combat" ],
    "Inputs": [
      {
        "Type": "Tribute",
        "Requirements": [ "HasWeapon=Bow", "!IsDead" ]
      },
      {
        "Type": "Tribute",
        "Requirements": [ "IsDead" ]
      }
    ],
    "Texts": [
      "{input[0]} shoots an arrow in the chest of {input[1]} killing him swiftly"
    ]
  }
]

When you create a new json for a service you must add it to the Files.Json in the same folder

Contexts

An array of contexts which describe what the string should be used for. These need to be implemented in the codebase in order to be used in the designer string system.

Inputs

An array of objects ("inputs") which each must have a specific type. They also can have an optional list of requirements

Currently implemented types (with implemented requirements):

With requirements you can negate them by inserting a "!" infront of the requirement string

Texts

An array of strings which can be used to create dynamic strings at runtime.

Format:

Properties that can be used