Difference between revisions of "IBCS1 - 1415 - January"
From WLCS
(Created page with "== Monday - Friday (1/26/15 - 1/30/15) == '''Agenda:''' * Complete 2-player Tic-Tac-Toe * 1-player Tic-Tac-Toe ** Edit drawShape() so that you do not use the '''turn''' variable ...") |
m (Protected "IBCS1 - 1415 - January" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading]) |
(No difference)
|
Latest revision as of 11:24, 2 February 2015
Contents
Monday - Friday (1/26/15 - 1/30/15)
Agenda:
- Complete 2-player Tic-Tac-Toe
- 1-player Tic-Tac-Toe
- Edit drawShape() so that you do not use the turn variable anymore
- Check valid move
- If so, then player moves
- Check for win/tie
- Computer automatically moves (see functions below)
- Check for win/tie
- Easy Computer
- Create a new function named computerMove(board), which takes the board as a parameter. It will return a list [row, col] where the computer will move
- Inside the function, generate a random row number and a random col number. If the [row][col] location is empty, then you can return it [row, col]
- If the [row][col] is not empty, then you should have a while loop that constantly generate new random numbers while the [row][col] location is non-empty
- Hard Computer
- Create multiple functions to analyze the board (e.g. checkRows(), checkCols(), checkDiags()) that looks for two in a line
- If there's two in a line, then return the location of the empty slot
- In case there are no two in a line, then return None
- Edit drawShape() so that you do not use the turn variable anymore
Wednesday - Friday (1/21/15 - 1/23/15)
- Complete and demo the graphical Tic-Tac-Toe
Tuesday - Friday (1/13/15 - 1/16/15)
Agenda:
- Complete and demo the console-based Tic-Tac-Toe
- Integrate graphics into your console-based Tic-Tac-Toe
Friday - Monday (1/9/15 - 1/12/15)
Agenda:
- Tic-Tac-Toe board review
- Complete the console text-based version of Tic-Tac-Toe
- You will need to implement the following functions:
- checkWin()
- Checks to see if there is a winner (3 lined up Xs or Os). Returns “X” if X wins, “O” if O wins, and “-” if there is still no winner
- Checks the 3 rows
- Checks the 3 columns
- Checks the 2 diagonals
- Checks to see if there is a winner (3 lined up Xs or Os). Returns “X” if X wins, “O” if O wins, and “-” if there is still no winner
- checkFull()
- Checks to see if every element in board[][] has been filled
- Return False if any of the elements in board[][] are equal to dash ("-")
- Return True if every element in board[][] is not equal to dash ("-")
- HINT: Instead of checking if the board[][] is full, check if it is NOT full
Monday - Thursday (1/5/15 - 1/8/15)
- Make sure you have completed all your missing assignments
- Tic-Tac-Toe walk-through
- On-line Python Tutor
- Introduction to Matrices
- Matrix Practice
- Write the code to create a 3x5 matrix of 1s
- Print out matrix
- Increase the element at [2][3] by 10
- Write a loop that increases all the elements of the matrix by 2
- Print out matrix