This assignment is a relatively simple program to capture various aspects of programming languages. This version is in Rust

The application is simplebidding for the game of Bridge described here. In addition to the specifications there, the following Rust-specific parameters will apply:

  1. The fossil repository already contains an application package called assign4. This was created with the command cargo new assign4 --bin. It contains a skeleton main.rs file and a testing.rs file with unit tests that you must pass for full marks.
  2. Your module must have a with_permutation function that accepts a vector of unsigned integers (usize) and returns a "game object" (whatever you define that to be).
  3. Your module must have a format_game function that accepts a "game object" and formats the current state of the board, returning that as a string.
  4. Most evaluation will be based on unit tests, including those provided.
  5. Your main module may have a main function that does a randomized shuffle of the integers 1-52 and then passes them to the with_permutation function and formats and prints the result.
  6. Put your ownership information (see the assignment page) in the assign4/Ownership.txt file.
  7. The marker should be able to test your program against the unit tests by entering the following code:
    cargo test
  8. If you implemented the optional randomized play, the marker should be able to run your program by entering the following code:
    cargo run
  9. You may add simple, low-level crates to the dependency list in the Cargo.toml file. For example you may want to add a random number generator crate.

You should do your assignment in the your fossil CPS506/A4 repository in a folder called assign4. Every time you have completed a part of the assignment, you should commit it to the repository. You shouldn't wait until everything is complete to do this, it's better to check in regularly. Remember to do fossil status, fossil ext, and fossil commit from somewhere within the repository periodically to make sure you're commiting all of your code. Also remember to not add binary files or other files that can be generated from the source. Edit the .fossil-settings/ignore-glob file that excludes commonly created files that should be excluded; add to that file if you notice any undesirable files being shown by fossil ext for commiting to the repository. You can so a fossil add . as many times as you want, but you only have to do it once each time there are new files to be included in the repository. In a terminal/command window simply change to the working directory and check-in, for example:

  cd cps506/A4
  fossil commit -m "finished code and tests for bidding"