Sunday, November 18, 2012

Chainshot Game

This Java program is a simple implementation of the chainshot game. Here are the rules: 


Get rid of all the blocks by finding sets of at least 3 that are touching via the Von Neumann neighborhood paradigm.

Pick a row and column to select a block to get rid of.
The bottom left is position (1,1).
The board is surrounded by X's. 
Once a block is removed, the empty blocks will be shown with a 'o'. 
chainshot.jar

Java CPU Simulation

This java program simulates the operation of a CPU and memory including the ALU, accumulator, registers, and program counter. The program takes in an 8 bit binary number including the op code and the value. Instructions include load/store instructions, add/sub accumulator and immediate, add/sub accumulator and value in memory address, halt and a jump instruction. The output displays the PC, the value in the accumulator, and the instruction being executed.
Source Code

CPU.jar

Execute .jar in cmd or terminal with:
java -jar CPU.jar