Gunnewiek.com

C++ Grid Class

This is a basic grid class which I plan to use for some simple games including a rewrite of my Connect Four game. This grid class uses std::vector for easy memory management.

Accessors:

  • height()
  • width()
  • retrieve(n, m)
  • print()

Mutalators:

  • insert(n, m, x)
  • resize(n, m)

Download

Data Structures and Algorithms

I just finished taking a data structures and algorithms course which was very cool and broadened my perspective when it comes to programming. Although we only got to program a small portion of the things we learned about, I feel that what I did implement is clean and efficient.

Mouse Jail for Twinview

This program will trap the mouse within certain screen coordinates. It can keep your mouse in 1 screen when trying to play games so it doesn't mess up side scrolling and eliminates the possibility of clicking on other windows which makes the game lose focus. The original version of MouseJail was designed to work with xinerama, but I modified it so that it works with nVidia's twinview. I personally use Openbox and it works great.

To use, just compile it and then run it like this (use appropriate coordinates):
./Jail 0 0 1920 1080
Note that the mouse might jump outside those boundaries for quick moments so use:
./Jail 0 0 1917 1080

Download

Connect Four

This is a console Connect Four game. This initial release only has support for a two player game, but I plan to add AI soon. Once I become more comfortable with C++ I will try to add graphics.

Download