LINQ is a powerful feature that enables the program to search collections of data in much the same way that SQL searches databases. This chapter shows the basics and how they can be used in the program.
If you’ haven’t checked out the Rogue C# series here on ComeauSoftware.com, you’re missing out on a great chance to see the C# language in action! This is a demonstration of C# coding through a single, epic project to recreate the PC version of Rogue, the classic dungeon RPG. If you’ve ever wanted to know […]
0
Now that the program can respond to different keys, it’s time to let the player start wandering the map. This chapter shows one way of doing this while making sure the player stays within the right boundaries.
0
One of the recognizable features of the original Rogue game was the long list of key commands that the player used for all actions, including eating, searching and using objects. Now we’ll see how we can implement those in our own roguelike.
0
At this point, our game can generate a random map and there are classes to control the game itself and define a player. Now I want to spread some gold around the rooms for the player to collect. In the process, we’ll be making some improvements to how the program handles Random values.
0
Programs often use multiple classes that work together to provide structure to the program. In this chapter, we’ll expand our roguelike with the new Game and Player classes.
0
What do you do when no algorithm seems to work without problems? In this chapter, we’ll see how not every problem is solved in a straight line and how some can be solved in phases.
0
Completing the hallways on a roguelike map is one of the most challenging parts of the game and it goes back to the importance of the right algorithm that will teach the computer to do what you take for granted.
0
String manipulation is a common task in programming and C# has a couple of different methods for performing large numbers of edits to a selection of text. In this chapter, we’ll compare them and see how efficient the StringBuilder class actually is.
0
We need just a little bit of supporting code to actually plot the rooms on the map. In this chapter, you’ll see examples of enumerations and dictionaries in C#. You’ll also see a way to check a char value against many others at once.
0
0