2.7 KiB
2.7 KiB
Cowsay Project - TODO List
1. Project Overview
- Understand the timeline: starts on the first day of INF203, ends on the last week (Sunday midnight).
- Plan to stay ahead, especially for the Bash section before C begins.
2. Preliminaries
- Read the
cowsaymanual withman cowsay. - List all
cowsayoptions/arguments in a table or list in your report. - Provide examples of executions for each option.
3. Bash Scripts
cow_kindergarten- Cow says numbers 1 to 10, 1-second pause between each, sticks out tongue at the end.
cow_primaryschool- Cow says numbers 1 to
n(argument).
- Cow says numbers 1 to
cow_highschool- Cow says squares (1, 4, 9, ...,
n^2) (argument).
- Cow says squares (1, 4, 9, ...,
cow_college- Cow says Fibonacci sequence up to
n.
- Cow says Fibonacci sequence up to
cow_university- Cow says prime numbers up to
n.
- Cow says prime numbers up to
smart_cow- Cow says a simple arithmetic expression (e.g., "3+11"), eyes show the result.
crazy_cow- Create a "crazy arithmetic cow" script with something unusual or complex.
4. C Programming
newcow.c- Create
affiche_vachefunction: displays a cow without a speech bubble. - Compile and run.
- Create
- Add Features
- Support
-e/--eyesoption to change cow's eyes. - Implement other options from
cowsaymanpage.
- Support
- New Feature
- Implement a new feature (e.g.,
--tail Lto adjust tail length, or display a herd).
- Implement a new feature (e.g.,
wildcow- Test and explain
update()andgotoxy(). - Create an animated cow using
update(),gotoxy(), andsleep().
- Test and explain
reading_cow- Cow "reads" a file character by character, displaying each in its mouth before "swallowing".
5. Automata (Cow-Tamagotchi)
- Design
- Draw an automaton for cow's health states:
liferocks,lifesucks,byebyelife. - Assume fixed
fitness,digestion, andstock.
- Draw an automaton for cow's health states:
tamagoshi_cow.c- Reuse
affiche_vacheto display cow's health state. - Initialize
stockandfitnessto 5. - Create
stock_update()andfitness_update()functions. - Main loop:
- Display cow's state.
- Display
stock. - Prompt for
lunchfood. - Update
stockandfitness. - Increment
duree_de_vie.
- End game at
byebyelife, display score.
- Reuse
6. Report
- Format: plain text, Markdown, Org, or LaTeX.
- Include:
- Source code.
- Execution outputs for relevant test cases.
- Comments in code and report: justify choices, ideas, challenges.
- Highlight original and advanced implementations.