Skip to content

Commit

Permalink
chore: update README.md (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabmaiti authored Mar 16, 2024
1 parent f9d2fbf commit 802fbc2
Showing 1 changed file with 3 additions and 38 deletions.
41 changes: 3 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<img src="https://sonarcloud.io/api/project_badges/measure?project=pallabmaiti_finding-falcon&metric=alert_status">
</p>

[TOC]

# Finding Falcone!

King Shan has received intelligence that Al Falcone is in hiding in one of these 6 planets - DonLon, Enchai, Jebing, Sapir, Lerbin & Pingasor. However he has limited resources at his disposal & can send his army to only 4 of these planets.
Expand All @@ -15,47 +13,14 @@ We are going to help King Shan find Al Falcone.
1. Open `FindingFalcone.xcodeproj` in Xcode.
2. The application doesn't have any third party. So, no additional step is required. By tapping the play button or `Command + R` should start running the application.



## Modules
The application is divided into three modules: [Select destinations](#select-destinations), [Find Falcone](#find-falcone) & [Networking](#networking).

### Select destinations
In this module, we can choose destinations one after another. Remember next destination can be choosen only after selecting planet & vehicle of current destination. Sequence of the module as follows:
```seq
View->Interator: get (vehicles, planets, token)
Interator->PlanetsAndVehiclesWorker: get (vehicles, planets)
Interator->TokenWorker: get (token)
TokenWorker->NetworkManager: get (token)
NetworkManager->TokenWorker: return (token)
PlanetsAndVehiclesWorker->NetworkManager: get (vehicles, planets)
NetworkManager->PlanetsAndVehiclesWorker: return (vehicles, planets)
TokenWorker->Interator: return (token)
PlanetsAndVehiclesWorker->Interator: return (vehicles, planets)
Interator->Presenter: present (vehicles, planets, token)
Presenter->View: display (vehicles, planets, token)
View->View: show destinations and store token
```
In this module, we can choose destinations one after another. Remember next destination can be choosen only after selecting planet & vehicle of current destination.
### Find Falcone
After selecting all the destinations we will move to this module, here we can see if Falcone Queen can be found or not. Sequence of the module as follows:
```seq
View->Interator: findFalcone(planetNames, vehcleNames, token)
Interator->FindFalconeWorker: findFalcone(planetNames, vehcleNames, token)
FindFalconeWorker->NetworkManager: findFalcone(planetNames, vehcleNames, token)
NetworkManager->FindFalconeWorker: return response
FindFalconeWorker->Interator: return response
Interator->Presenter: present response
Presenter->View: display sucess or failure
View->View: show sucess or failure
```
After selecting all the destinations we will move to this module, here we can see if Falcone Queen can be found or not.
### Networking
This module defines how the API calls getting called. Sequence of the module as follows:
```seq
NetworkManager->APIClient: send API
APIClient->APIClient: process dataTask
APIClient->NetworkManager: send data
NetworkManager->ResponseHandler: parse data and convert it to object
ResponseHandler->NetworkManager: send object
```
This module defines how the API calls getting called.
## Testing the Application
From the debug bar, choose the scheme FindingFalconeTests. Run the test cases by `Command + U`(runs all the test cases) or going to individual Test files.

0 comments on commit 802fbc2

Please sign in to comment.