CMSC 316: Raptor 5-02-06
Vitals
Description
Images
Downloads
Status: Release/Final
Language: C++
Platform: Linux
Downloads: 128

Raptor is a program that I had to write for my Object-Oriented Programming class. It was difficult because we had to write it on a Linux server over telnet. It was supposedly a group project, but (and I'm not trying to have too great an ego here) I knew my skills and ambition would exceed that of most of my classmates. Besides, the majority of them were too busy playing World of Warcraft to write a week's worth of code. As the due date grew near and the slacker groups began to scramble to get some code done, I heard that they found my nearly finished program and were floored by my use of colors and grids (courtesy of the ncurses lib) and the fact that it actually worked. At the due date, my program was the only one completed.

The program is meant to simulate five prey and five raptors moving around a 20x20 grid. The raptors are obviously trying to eat the prey, but if they don't feed before 20 turns are up, then they will starve. The prey can see raptors in a 10x10 square around them; raptors can see infinitely horizontally, vertically, and diagonally (like a queen in chess). They all get to move in groups by one square per turn. All the prey on a square are eaten if a raptor lands on that square.

The AI is very simple. Still, for the simplicity of the rules, they do rather well. Thus, the prey ...
 



SnakeByte Content Browser 2.0b (bld 12-4-10)