top of page

Visual Basic

Set - card game

​

Here's the classic game Set.

​

You can play between 1 to 4 players.

​

The idea is like this. There's 4 "properties" each card can have:

​

1) Color

2) Number

3) Shape

4) Fill Pattern

​

A match consists of 3 cards. Each property must be either the same or different on all 3 cards. Whether one particular property is all the same or different has no bearing on the other properties, which can be all the same or different.

​

For example, a match would consist of

​

1) All the same color

2) All different numbers

3) All different shapes

4) All the same fill pattern

Conway's Game of Life

​

Here's another computer classic.

​

This isn't really a game; it's more of a fun toy for computer and math nerds.

​

There's a grid consisting of black and white squares, pixels, cells, or dots (Those are just different names for the same thing). You can start with any pattern. Based on certain rules, the grid changes from one moment to the next. Each moment is called a "generation". How the grid will look in any particular generation will depend on the state of the grid in the previous generation, based on the rules I referenced before.

​

Here are the rules. White cells are considered "alive" and black cells are considered "dead". For a live cell to stay alive in the next generation, it needs to have exactly 2 or 3 live cells next to it, only counting the 8 cells immediately around it and diagonal to it (like the moves of a King in chess.) More than that and the cell "dies" from overpopulation. Less than that and the cell "dies" from lack of societal support.

​

A dead cell can come alive if there are exactly 3 live cells in its vicinity.

Conway's Game of Life

​

With these rules, the white cells do all kinds of funny dances aross the screen, as large islands of cells swell and shrink and change shape. All very exciting.

​

In my version, the black and white cells are reversed, so black means alive and white means dead.

​

I'm not sure how well this is coded; I did this a few years ago.

​

Just press the "Timer" button to get things going. You can play around with some parameters. I think you should be able to draw new dots directly on the screen, just it might be useful to pause the timer first.

SHORTEST PATHS

​

This is a chess training game I made up based on the technique developed in the book Rapid Chess Improvement.

​

Gameplay is as follows: A piece is chosen to train with, let's say a Queen, for example. The board is then littered with pawns, an enemy King, and the piece to train with. All the pieces are static, meaning they don't move. The computer will calculate the least number of moves that it would take for the training piece to reach the enemy king and the total number of unique paths to do that. The player has to click on the squares to highlight or unhighlight them, marking off all the possible paths. Pawns cannot be captured and squares that are attacked by enemy pawns cannot be highlighted.

Shortest Paths - Rapid Chess Improvement
bottom of page