Ball Simulation

The final project of Ics 33, is to create a simple simulation of various types of balls, in Python. In this project, the view and controller come already written, and I had to implement the model, or the underlying logic, and interface it with the controller. The main concept being taught by this is inheritance; each type of ball is a class, and each class inherits from another base class.

The blue Balls are simplest, they simply move at constant speed and bounce off of the edge of the canvas. Red Floaters are similar, but they randomly change direction and speed as they move. Black Holes are stationary, and ‘eat’ any ‘prey’ (Balls and Floaters) that hit them. Pulsators inherit from Black Holes, and grow or shrink depending on how much prey they eat. Hunters inherit from Pulsators, but are mobile, and will chase the nearest prey. And finally, the green Specials; each student could implement their Special however they wanted. I chose to make a kind of ‘snake’ out of multiple specials; it inherits from Floater (so it counts as prey), and the front ball behaves in the same way, but all the other balls will follow each other in a line.

Othello

The final project of Ics 32, is to turn the command-line logic of the previous assignment into a full GUI-based version of the board game Othello. This project is done in Python, using the TkInter library for the windows.

The challenge was to take the game-logic class implemented in the previous assignment and, without changing it, create a GUI for the game. Two more classes had to be implemented, the main window and the options menu window, which both interfaced with the logic. I chose to add one additional piece of functionality beyond the requirements, which is the show moves button; when show moves is on, all possible moves for the current player are highlighted.