Archive for the ‘C/C++’ Category

C++ – Minesweeper

The other day I was tutoring a freshman programmer program his first minesweeper text game in C++. Here is the resulting code. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 [...]

C – Simple ASCII RPG/MUDD

This is a very simple RPG that uses ASCII art. It’s not balanced nor complete, just meant to serve as a tutorial of some procedural coding in C. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [...]

John Conway’s Game of Life – Windows/C++ (ASCII)

This is a simple version of John Conway’s Game of Life written in C/C++ and runs on Windows using ASCII graphics. For a more interesting version using SDL to draw pixel graphics, check out this link: John Conway’s Game of Life – C++/SDL Here is the code for the ASCII Version: 1 2 3 4 [...]

TicTacToe – C (procedural style)

This is a simple version of TicTacToe written in C. I wrote this primarily to help a friend of mine. It has virtually no error checking (primarily in regards to the scanf functions, so don’t mess up while inputting!) #include <stdio.h>   char board[3][3];   char turn = ‘X’;   void init(char board[3][3]); void draw(char [...]

Vector ND – C++

This is a N-Dimensional Vector class written in C++. While it can be used for any dimension, if you would like to use 3 or less dimensions including rotation functions check out my previous post (here) VectorND.cpp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [...]

Powered by WordPress | Designed by: WordPress Themes | Thanks to best wordpress themes, Find WordPress Themes and Themes Directory