Please note that this is a test example and should not be used as a real world example. This should also not be copied to pass a test that you do not know the answer for. This is for educational purposes only.
See the challenge notes in this repository.
This is a coding challenge for a conveyer belt. There is a factory production line around a single conveyor belt. Components (of type A and B) come onto the start of the belt at random intervals; workers must take one component of each type.
This is an Example of a Conveyer Coding challenge solution.The concept of this solution is broken down in to a few basic steps. This includes basic testing to test the conveyer-belt logic.
- Create a Heartbeat, the concept of time.
- Assign a worker to a slot in the conveyer-belt.
- Allow the conveyer-belt to contain objects with an assigned value.
- Allow the worker to choose how it wishes to interact with the conveyer-belt.
- Allow the worker to process a slot on the conveyer belt.
- Allow the worker to stop processing items from the conveyer belt, and have a seperate process that can occure when conditions are met.
- Run tests to ensure the logics are correct.