UMass Lowell Dept. of Computer Science

91.461 GUI Programming I

Fall 2015 Semester, Section 201

Prof. Jesse M. Heines

Assignment No. 9

Implementing a Bit of Scrabble with Drag-and-Drop

Date Due:  Wednesday, December 9, 2015


Contents     Top

Please Note:  This is the last assignment of the semester.  As announced repeatedly in class, it will not be accepted late.  The due date of Wednesday, December 9, 2015, is a hard deadline.  You must submit this assignment on time.  If it is not complete, you will receive partial credit.


What This Assignment Is About     Top

The purposes of this assignment are to give you additional experience working with the jQuery UI and to pull together much of what we’ve been doing throughout the semester.  As discussed in class, you are to implement a bit of the game of Scrabble using drag-and-drop.  The idea is to display one line of the Scrabble board to the user along with seven letter tiles.  The user then drags tiles to the board to make a word, and you are to report his or her score, taking the letter values and bonus squares into consideration. 

There are a number of pieces that you need to pull together to create this program:

There are many features that you can add to this program.  One of the most obvious is a button that “deals” another seven random letter tiles so that the user doesn’t get “stuck” if he or she can’t make a word out of the letter tiles that were dealt.  I’m sure that you can think of others that will improve the user experience.  Be creative.  This really should be fun as well as educational.

If you’re completely unfamiliar with Scrabble, see https://en.wikipedia.org/wiki/Scrabble and http://scrabble.hasbro.com/en-us/rules.

Please note that we expect to see very different levels of sophistication and completeness of this assignment.  That’s fine.  No matter how far you get, you will definitely learn.

We also expect people to help each other by sharing data structures, graphics, and even algorithms.  That’s fine, too, but remember that when you use others’ work or share yours with another student, you must always document where and from whom your various components came from and with whom you shared yours.


What You Are To Do     Top

  1. Refer to the jQuery UI documentation and examples on the jQuery UI website.
     
  2. Begin your development by programming and testing dragging-and-dropping one graphic (the source) to another (the target) to ensure that you know how to do that.
     
  3. Next, add multiple graphic sources and multiple graphic targets and write code that allows you to identify which source was dropped on which target.  The use of this and $(this) can be tricky here, so you’ll need to explore the examples on the jQuery UI website and do some experimentation with your own graphics.


     

  4. Implement the “rack” (which can just be an area of the screen) to hold the user’s letter tiles.  Each tile must be a single draggable image.
  5. Implement a single row of the Scrabble board as a series of images, each of which is a drop target.
  6. Implement the algorithm to identify which letter tile was dragged to which block.
     
  7. Implement the algorithm to tally the score of the user’s word after he or she somehow indicates that all the tiles in the word have been completely played.
     
  8. Add other features to enhance your program.
     
  9. Test your page thoroughly.  Try to anticipate all the errors that a user might make, whether intentional or unintentional.  Make sure that you handle each possibility. 
     
  10. Have a friend run your application and try to “break” it.  Plug any “holes” that your friend finds in your application and/or its validation scheme.


Submitting Your Assignment for Grading     Top

As always, submit your assignment using the Assignment Submission Form.  This form will lead you through providing all the information we need to evaluate your work, confirming that it is correct, and then e-mailing that information to our teaching assistant and me with a copy to yourself.  Be sure to select 91.461 Assignment No. 9: Implementing a Bit of Scrabble with Drag-and-Drop from the assignment drop-down list on that form.

Important Note:  If you do not receive an e-mail in your CS account within a few minutes confirming that your assignment has been submitted, something has gone wrong.  Try submitting again or contact me.


How You Will Be Graded     Top

This assignment will be graded on a 40-point system with points awarded as follows.  Please note that the lists of features provided below are not meant to be exhaustive.  They are merely representative of the types of things we are looking for in each grading category.  As always, 20% of your grade is for documentation.

Since this is the final assignment of the semester, two additional critieria will apply:

  1. This assignment will be weighted twice that of a standard assignment.
  2. Remember that this assignment will not be accepted late.  The due date of Wednesday, December 9, 2015 is a hard deadline.  You must submit this assignment on time.  If it is not complete, you will receive partial credit.
Criteria  (numbers in parentheses are the points that can be earned for that bullet item) Possible
Points

Program Integrity / Design

Basic Functionality
  • (4) letter tiles in the player’s “hand” are selected randomly from a data structure with the proper distribution of the letters
  • (4) letter tiles can be dragged-and-dropped onto target Scrabble squares
  • (4) program identifies which letter tile is dropped onto which Scrabble square
  • (4) board includes bonus squares
  • (4) score is tallied correctly, including consideration of bonus square multipliers
Additional Functionality
  • (2) any number of words can be played until the player wishes to quit
  • (2) the board is cleared after each round so that a new word can be played
  • (2) after playing a word, only the number of letter tiles needed to bring the player’s “hand” back to 7 tiles are selected
  • (2) score is kept for multiple words
  • (4) multiple Scrabble board lines are implemented

32

Source Code Documentation and Formatting

  • user name and pertinent contact information appear in all source files
  • all files contain adequate explanatory documentation that is meaningful and does not merely echo code
  • all files are properly indented and formatted with adequate white space for readability
  • any sources used are cited in comments embedded within code

8




This is document http://jesseheines.com:8080/~heines/91.461/91.461-2015-16f/461-assn/ImplementingScrabble-v01.jsp.  It was last modified on Friday, August 26, 2022 at 4:09 PM.
Copyright © 2022 by Jesse M. Heines.  All rights reserved.  May be freely copied or excerpted for educational purposes with credit to the author.