We are going to build the start of an inventory system. To encapsulate the concept of items in our game, we are going to define a GameItem model class. This class will have the base properties of all GameItems. Then, we will define a derived class for Weapon. Weapon is a specialized item that also … Continue reading Lesson 3.1: Game Items and Factory
Tag: tests
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
Lesson 2.4: Testing the MVVM Components
Now that we've put together all of the MVVM components, we're going to take a quick look at the testing across these components. View Model Tests We have already looked at the Player unit test in Lesson 2.1. Now, let's create some tests for the GameSession view model. In the SimpleRPG.Game.Engine.Tests project, create the GameSessionTests … Continue reading Lesson 2.4: Testing the MVVM Components
Lesson 2.1: Initial Player Class
As we start building our RPG, we need to consider how to design the layers of the game. It is a typical pattern to separate the user interface from the code that drives behavior. For a game, we would separate the game screens and UI from the the game engine. We want to put as … Continue reading Lesson 2.1: Initial Player Class