This is a project to test my abilities in JavaScript.
The goal of this project is to create a random message generator that generates a new message every time the action button is activated.
The program will create messages for a Psychic to read the future of the user.
Messeges will have three components:
-
A starter line, saying that she is seeing in the future that something will happen.
-
A verb
-
An action based on which kind of verb was randomly selected
The elements that will compose the sentence are:
- An initial phrase
12 possibilities
- 'You will' String
1 possibility
- A verb
7 possibilities
- A Finisher sentence
Around 15 possibilities for each verb
This is path these elements go through to be randomly generate a final sentence:
graph LR
A[Inicial Phrase] --> B('you will' String) -- random select -->C{Verbs}
D{verbs} --> E((be))
D --> F((get))
D --> H((etc...))
E --> I(*be* finisher 1) -->U{Final Sentence}
E --> J(*be* finisher 2) -->U{Final Sentence}
E --> K(*be* finisher...) -->U{Final Sentence}
F --> L(*get* finisher- 1) -->U{Final Sentence}
F --> M(*get* finisher- 2) -->U{Final Sentence}
F --> N(*get* finisher...) -->U{Final Sentence}
H --> R(*...* finisher- 1) -->U{Final Sentence}
H --> S(*...* finisher- 2) -->U{Final Sentence}
H --> T(*...* finisher...) -->U{Final Sentence}
This language will be used for the back-end design of the project.
Main concepts used:
-
Arrays and their functions.
-
Functions.
-
Math object.
-
Conditionals.
-
Switch statements.
-
DOM events.
Used to construct a simple interface so the user can press the action button and get the results.
Main concepts used:
-
Semantic elements
-
Responsive Design
The witch drawing was created by an AI (not mine), from the website tinywow
- To write README file