Reader small image

You're reading from  Kotlin Design Patterns and Best Practices - Third Edition

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781805127765
Edition3rd Edition
Right arrow
Author (1)
Alexey Soshin
Alexey Soshin
author image
Alexey Soshin

Alexey Soshin is a software architect with 18 years of experience in the industry. He started exploring Kotlin when Kotlin was still in beta, and since then has been a big enthusiast of the language. He's a conference speaker, published writer, and the author of a video course titled Pragmatic System Design
Read more about Alexey Soshin

Right arrow

Mediator

Our game development team faces unique challenges, and they aren’t strictly tied to the code. To give you a refresher: our indie operation consists of just me, alongside Michael, a canary who dons the hat of a product manager, and a duo of cat designers. These feline creatives, while often napping, occasionally grace us with quality mockups. Our glaring omission? We lack a dedicated Quality Assurance (QA) team. This might explain the recurrent crashes our game experiences.

On a brighter note, Michael recently introduced me to Kenny, a parrot who, as it turns out, specializes in QA:

interface QA {
    fun doesMyCodeWork(): Boolean
}
interface Parrot {
    fun isEating(): Boolean
    fun isSleeping(): Boolean
}
object Kenny : QA, Parrot {
    // Implements interface methods based on parrot schedule
}

Kenny is a simple object that implements two interfaces: QA, to do QA work, and Parrot, because it’s a parrot.

Parrot QAs are very motivated. They...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kotlin Design Patterns and Best Practices - Third Edition
Published in: Apr 2024Publisher: PacktISBN-13: 9781805127765

Author (1)

author image
Alexey Soshin

Alexey Soshin is a software architect with 18 years of experience in the industry. He started exploring Kotlin when Kotlin was still in beta, and since then has been a big enthusiast of the language. He's a conference speaker, published writer, and the author of a video course titled Pragmatic System Design
Read more about Alexey Soshin