Difference between revisions of "MatLab Tic-Tac-Toe"

From ENGR005 2008
Jump to: navigation, search
(Code)
(Code)
 
Line 37: Line 37:
  
 
==Code==
 
==Code==
[[Download File Here|Image:TicTacToe Code.zip]]
+
[[Image:TicTacToe Code.zip]]

Latest revision as of 18:12, 10 December 2008

Members

Philip Koonce

Project Motivation

The primary purpose of this project is to learn how to create a graphical user interface (GUI) in MatLab and to become more comfortable programming in the MatLab language.

Project Descrition

MatLab has two primary methods for creating a GUI. It can be done progamatically or with MatLab's built-in toolset, GUIDE, which stands for Graphical User Interface Development Environment. I plan to explore both options, and make two final versions of the program, one using each of the methods. One goal is to implement as many elements of the MatLab GUI as possible.

Equipment

No equipment in addition to the software and a computer will be required.

Timelime

11/20-12/1 - Learn the various ways of implementing a GUI 12/1-12/8 - Implement the program

Design Process

Concept Sketch

Interface.jpg

Implementation

1. GUIDE (Graphical User Interface Environment) --Overly complicated. Wrote unnessecary code that was incomprehensible with my limited experience. --Also less accurate. I couldn't draw the buttons exactly where I wanted them, to a pixel. 2. Create programatically, using MatLab's help manual for instruction

Necessary Components

1. Parent Figure 2. 9 "Game Grid" buttons 3. "New Game" button 4. "Quit" button

Problems/Solutions

Global variables - must me declared as global in each function of your program Callback functions - complicated methods for attaching to UI Buttons and passing arguments. Help manual explained callbacks in great depth.

Code

File:TicTacToe Code.zip