# ortalib

`ortalib` is the support library for **Ortalab**, an assignment in COMP6991
(*Solving Modern Programming Problems with Rust*) at UNSW.

Ortalab operates within a simplified subset of
[Balatro](https://www.playbalatro.com/), focusing specifically on calculating
the score of a single hand. The assignment is to write the program that performs
that scoring. `ortalib` provides the shared types that program is built on, so
that your effort goes into the scoring logic rather than into parsing input.

A round of Ortalab is described by a YAML file: the cards played, the cards held
in hand, and the jokers in play. `ortalib` deserialises that file into a
[`Round`] and gives you the rest of the vocabulary needed to score it:

- the structs [`Round`], [`Card`], and [`JokerCard`]
- the enums [`PokerHand`], [`Joker`], [`Edition`], [`Enhancement`], [`Rank`], and [`Suit`]
- the type aliases [`Chips`] and [`Mult`], both of which are `f64`

Every type except [`Round`] is `Copy`.

If you are taking the course you do not need to add this crate yourself; it is
already a dependency in your starter code. The full specification, including how
each card, joker, and modifier contributes to the score, is on the
[course website](https://cgi.cse.unsw.edu.au/~cs6991/).

[`Round`]: https://docs.rs/ortalib/latest/ortalib/struct.Round.html
[`Card`]: https://docs.rs/ortalib/latest/ortalib/struct.Card.html
[`JokerCard`]: https://docs.rs/ortalib/latest/ortalib/struct.JokerCard.html
[`PokerHand`]: https://docs.rs/ortalib/latest/ortalib/enum.PokerHand.html
[`Joker`]: https://docs.rs/ortalib/latest/ortalib/enum.Joker.html
[`Edition`]: https://docs.rs/ortalib/latest/ortalib/enum.Edition.html
[`Enhancement`]: https://docs.rs/ortalib/latest/ortalib/enum.Enhancement.html
[`Rank`]: https://docs.rs/ortalib/latest/ortalib/enum.Rank.html
[`Suit`]: https://docs.rs/ortalib/latest/ortalib/enum.Suit.html
[`Chips`]: https://docs.rs/ortalib/latest/ortalib/type.Chips.html
[`Mult`]: https://docs.rs/ortalib/latest/ortalib/type.Mult.html
