project screenshot
0
9

Description

Freecell, a project made by Jittery Firefighter using Tynker. Learn to code and make your own app or game in minutes.

Text Snippets

  • lay out columns headers and cards
  • create eight column headers (cards with rank of 14, area "board".)
  • badly placed cards
  • board placeholder
  • _last card placed
  • under each column, place 7 or 8 cards.
  • place random card on previous
  • _number of spots
  • create _number cards with rank of -_rank, area _area, at _placeholder.
  • card width plus gap
  • number of free cells
  • put 52 card strings ("1.c", "13.s", etc) in order into _deck.
  • cover the last card placed with a random card from the remaining deck.
  • record card name in _card_objects, like '7h' -> 'card42'.
  • pick random between 1 and
  • intro is choosing options.
  • level 1 is dealing.
  • level 2 is playing (accepting user card movements.)
  • level 10 is secret code entry.
  • gameover is when you win (there is no lose.)
  • covered card vertical distance
  • set up the board
  • name of selected card
  • _freecell objects
  • free cells placeholder
  • ace stacks placeholder
  • move from level 1 (dealing) to level 2 (playing).
  • uncover our seat, cover _target, unselect us.
  • name of card under me
  • notice if we move off a bad placement (closer to winning).
  • tell the card we were covering that we aren't anymore.
  • name of card on me
  • tell _card we are covering it.
  • without the wait, _card hasn't moved from its inital position, and we all stack
  • on top of each other. something about finishing the js task probably.
  • slide down if we are on another normal card on the board area.
  • change our area if needed.
  • play card plop sound, and check for win, unless we are dealing (level 1)
  • try to cover us with the selected card, or try to select us.
  • note that a click on a selected card is caught and handled by the halo actor.
  • you may select normal, uncovered cards not in the done pile, while playing.
  • cover _card with this card if it is legal. either way, unselect selected card.
  • may be covered by
  • true if covering this card with _card is a legal move.
  • we can't be covered twice.
  • in the freecell area, only the freecell placeholder may be covered.
  • on the done pile, the rank must be 1 bigger than ours,
  • and the suit must match unless we're the placeholder.
  • column headers may take any card.
  • a card on the board: true if _card is opposite color and one lower rank.
  • return the name of a new clone with the given variable values.
  • rank is 1 to 13 for normal cards.
  • 0 means the "done" spot, 14 means the column header, -1 means the free cell.
  • suit is h d c or s for normal cards, and blank for done/columnheader/freecell.
  • area where the card is currently may be 'board', 'done', or 'freecell'
  • game: gameover unloading
  • autostack: stack on
  • clicking a selected card unselects it.
  • game: intro loading
  • autostack: finished
  • secret code: inputting code
  • secret code: done inputting code
  • game: gameover loaded
  • script is aborted by "stop all sounds" below.
  • game broadcasts many "-ing" and "-ed" events.
  • "-ing" events wait for completion. do not run long scripts in them!
  • use "-ing" for quick initial setup, then "-ed" events for long running code.
  • timer seconds elapsed
  • set number of levels
  • game: score changed
  • game: intro unloading
  • game: level unloading
  • game: intro loaded
  • game: gameover loading
  • game: level loading
  • game: level loaded
  • game: level won
  • game: levelling up to
  • title screen number
  • assign suits to blank stacks
  • card with lowest rank
  • find initial top cards
  • card with lowest rank in top card list
  • card that belongs on
  • glide higher card onto lower card.
  • call actually cover.
  • replace lower card in top card list with higher card.
  • _random number stream
  • last characters of
  • hide label while setting ask font, or it jumps large for a moment
  • only way i know to set style of ask() to message box. font style ignored.
  • center message box
  • see hide() above
  • nb: awful tynker bug: "0" cannot be chosen. "0 " works.
  • each shuffle has a code. enter a code to deal the same way again, or to race your friends!