Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The betting screen was implemented by drawing texts, numbers and figures on an Android canvas. The content of texts, values of numbers and the position of figures are decided by user’s actions, which are detected by tracking the position and behavior of user’s finger.
  • The whole screen is divided into different rectangular areas (I call them boxes) that represent different alternatives in each category(location, price, cuisine) as well as the three piles of chips(5, 10 and 25). Each box keeps record of the number of each type of chips currently inside the box. The numbers (chips left, total points for a category) are updated based on the record of each box.
  • OnTouch event is used to capture user’s actions. When the user taps the screen, the app checks if the position is inside any box and changes the value of a status variable to record the starting box of current action. If the starting box has chips, when the user moves his finger, there is going to be a chip following his/her finger. At the same time, each box recalculates the number of chips in it or the total points of chips left to decide the updated number of chips to show in the box. When user’s finger leaves the screen, the position is checked and we decide based on the position whether or not it’s a effective action to put the chip in a new location(box). Then all the numbers and status are updated and redrawn.
  • To make the app more playable and enable all the direct manipulations that a user can expect. The betting screen enables users to “drag” chips instead of just clicking the chip and clicking one destination. Also, it enables users to move chips freely, including moving from chip piles to betting table, moving within the betting table, removing from the betting table.
  • To make clearer feedback of wrong actions, vibration is added when the user fails to put a chip in an effective place.
  • Making it more realistic by making a chip pile empty when the chips left is smaller than the face value of a pile.The betting screen was implemented by drawing texts, numbers and figures on an Android canvas. The content of texts, values of numbers and the position of figures are decided by user’s actions, which are detected by tracking the position and behavior of user’s finger.

Spinner

  • The spinner is implemented using Android's drawing APIs to draw wedges of a circle on a canvas, and draw text on top. The backend keeps track of the amount of rotation applied so far, and drawing is done relative to that amount of rotation. The spin animation is achieved by increasing or decreasing the degree rotation at timed intervals, and redrawing the wheel. A swipe gesture is detected by dividing the screen into quadrants and waiting for a finger-swipe that starts and ends in adjacent quadrants.
  • The victor is determined by precomputing the final wheel spin once the user starts spinning the wheel, and computing which wedge is under the pointer drawn on the screen when the wheel is in its final location. The winner is predetermined so that a user can't game the system by trying to stop the wheel in a particular position.

Restaurant Details

Evaluation

...