Lesson 3.3: Build Inventory System

Starting with a simple inventory item list was a good way to being thinking about this problem and building the user experience to show a player's inventory. However, exposing the list directly and allowing all callers to edit the list can lead to a lot of duplicate code editing that list, and builds more interdependencies … Continue reading Lesson 3.3: Build Inventory System

Lesson 3.2: Initial Player Inventory

Our first attempt at providing player inventory will be a simple one -- and we will expand upon it as we build out the game engine. For this initial system, we are going to use a simple list in the Player class that holds the player's items. using System.Collections.Generic; namespace SimpleRPG.Game.Engine.Models { public class Player … Continue reading Lesson 3.2: Initial Player Inventory

Lesson 2.10: Moving in the Game World

Showing the player's location is the first step, but we also need to provide the ability to move around our game world. We're going to build some controls and event handlers that move the player between adjacent locations in the world. To begin we're going to create a new view model class to assist with … Continue reading Lesson 2.10: Moving in the Game World

Lesson 2.7: Adding a Test Mocking Framework

With our current test project, we have several classes that we created to "mock" some simple behavior for our tests: MockGameSession, MockJSRuntime, and MockIconProvider. As we build out our game, we will need to mock more classes to help simplify our testing. Creating mock objects manually is repetitive and time consuming, so to increase our … Continue reading Lesson 2.7: Adding a Test Mocking Framework