Boring or fun is quite subjective while talking about gaming. However, by applying proper design principles, we can put most players in an intended experience even for a very simple game. This article will demonstrate some tricks to achieve that. Video tutorial is at the end of the post. What is the game 🤔 It is the number guessing game (guessing genre). Its mechanic is simple. A player will keep...
Advanced Python: Object operations and comparisons
In many cases, it is convenient to perform mathematical operations on objects rather than numerical values. Python classes have the ability to emulate the behaviour of numeric values to support operations like addition and subtraction. You can override many more to support number-like functionality. Numeric functions In the following table, the right column contains expressions...
Build an android calculator in 5 minutes
Mobile Calculator This tutorial, we demonstrate how to use Android Kotlin to build a mobile calculator in just 5 minutes. It is really simple and fun. You can watch a video tutorial at the end of this post. Create an android project with Kotlin From Android Studio welcome page, select “Create a new project” and follow the instruction on screen. Enter the app name, package name and use...
Advanced Python: classes String and computed attribute
This article demonstrates more advanced features of Python classes and their customisation. Specifically, how enum objects are created, class to strings, and computed attribute. Class string values A string is typically an informal representation of the object. However, it’s just a nicely in human-readable form. Python provides 2 common methods, i.e. str() and repr(). We can...