IBCS1 - 1415 - January

From WLCS
Revision as of 11:24, 2 February 2015 by Admin (talk | contribs) (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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
      1. Check valid move
      2. If so, then player moves
      3. Check for win/tie
      4. Computer automatically moves (see functions below)
      5. Check for win/tie
    • Easy Computer
      1. 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
      2. 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]
      3. 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
      1. Create multiple functions to analyze the board (e.g. checkRows(), checkCols(), checkDiags()) that looks for two in a line
      2. If there's two in a line, then return the location of the empty slot
      3. In case there are no two in a line, then return None

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
  • 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
    1. Write the code to create a 3x5 matrix of 1s
    2. Print out matrix
    3. Increase the element at [2][3] by 10
    4. Write a loop that increases all the elements of the matrix by 2
    5. Print out matrix