TicTacToe Media

Below are some of the TicTacToe media I created for Android app on phones. There is the main menu, single player options and how the game play looks.

After that, we have these screenshots show some different winners and more of the game board. The winner notification is an injected XML file with certain logic based on who wins. Similarly, the cat can also win but is not pictured here.

Additionally, these pictures are a close up of the X and O icons as well as the app picture that would be on your phone. Powersjo made these icons.

Lastly, this bit of media are the GIFs that are used when a round is over and someone wins. The GIFs had frames modified to make sure they are around the same time in their loops. These gifs appear in 6 spots randomly once the round is over.

I hope you liked the insight on the TicTacToe media for the app. You can download the game from the Google Play store here or from the Amazon app store here.

For making the small images and icons I used Pixlr E here.

Check out my other apps FartYou and DownloadCPU.

You can view the privacy policy for the app here.

What did I learn: Tic-Tac-Toe App

This is my first game app for Android and it’s a tic-tac-toe game. I’ve made TicTacToe before on other platforms but not with Kotlin and published on Android. I thought we could go through some of the similarities, differences and what I learned. First, what was similar was the game logic.

Game Logic

Tic Tac Toe logic is an easy game to make in code. I chose to go the route of an Array of arrays and keep track of the board with a 0, 1 and 2. A designation for a blank spot, X and O.

 private val top: IntArray = intArrayOf(0, 0, 0)
 private val middle: IntArray = intArrayOf(0, 0, 0)
 private val bottom: IntArray = intArrayOf(0, 0, 0)
 private val board: Array<IntArray> = arrayOf(top, middle, bottom)

GUI

Then just have a visual representation of the board with HTML using a top level FrameLayout, a couple LinearLayouts and ImageViews to click on. The nesting and sizing got a bit tricky to make sure the app would scale up and down and still work on many devices.

board layout with HTML XML structure in Tic Tac Toe

The main learning curve I ran into was working with the UI. First I learned how to stack layouts on top of each other to achieve the layers on top of each other and the top to bottom look of the game. It took a mix of LinearLayouts (both horizontal and vertical), FrameLayout and RelativeLayout.

app layout with HTML XML structure in Tic Tac Toe

Second I learned about injecting a view into the current main view in the case of a popup window. I needed a way to notify the player that the round was over and who won. I did this with an inflater and used a pre-made HTML XML layout to inject the layout into the current activity.

val inflater: LayoutInflater = getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
val view = inflater.inflate(R.layout.popup_view,null)
// Lots more code here. 
TransitionManager.beginDelayedTransition(background_main)
        popupWindow.showAtLocation(
            background_main, // Location to display popup window
            Gravity.CENTER, // Exact position of layout to display popup
            0, // X offset
            0 // Y offset
Image of 'O wins!" popup in Tic Tac Toe.

AI

The third piece of knowledge was just working on the AI for the game. In single player mode, I created the AI and had to scale back the knowledge of the AI. In Tic Tac Toe there are not many moves. If you make the AI too good then the game will either always be cats game or won by the AI. So building a bit of randomness with the choices was needed to keep the AI a bit dumb.

With those three notches under my belt I can move forward onto bigger and better apps on Android. I’m happy with my results even though I had a list of improvements and features, about 10, that I could add to the app. At a certain point it is best to just release it and if it generates interest then I can work on the additions.

You can download the game from the Google Play store here or from the Amazon app store here.

Check out my other apps, FartYou and DownloadCPU.

You can view the privacy policy for the app here.

Fart You GUI

My app for Android has a refreshed GUI. You can find the app with the new Fart You GUI on the Google Play store here. In this post I’ll talk about the different layout code and what I learned. The Fart You GUI used to be made with the ConstraintLayout class. Android depreciated the Constraint Layout class. It looked like this:

The buttons didn’t scale and the whole app looked poorly written. With the new design, a LinearLayout with multiple LinearLayout and a ScrollView within, the app looks much better. The top level code within the main_activity.xml file looks like this:

<LinearLayout>
  <ScrollView>
    <LinearLayout>
    </LinearLayout>
    <LinearLayout>
    </LinearLayout> 
  </ScrollView>
</LinearLayout>

The xml file did not only have LinearLayout and Scrollview. There is also <Button>, <ImageView> and <TextView> tags. This allowed me to code a top bar for the app name and image, the middle of the app with all the buttons and function of the app and a bottom bar with the Ad bar.

This produced a better result with bigger buttons that are more responsive to the screen size of the Android device. At the end the app looked like this:

If you want to see my previous posts on the Fart You app check out here and here.

Here is the documentation for LinearLayout for Android here. Thanks for reading! Fart You!

I have a new Tic Tac Toe app. You can download the game from the Google Play store here or from the Amazon app store here.

Practical Joke App

Download the Fart You app for Android now. The best practical joke app or your money back.

Fart You

Everyone needs to laugh. Everyone has a phone. Therefore, for those of you with an Android phone, I have the perfect practical joke app: Fart You!

You can find the app here on the Play Store:

https://play.google.com/store/apps/details?id=com.powersjo.myapplication

The app has been recently remodeled for maximum flatulence fun. Now with 18 awesome fart sounds, you can play a practical joke on anyone with your phone! Each sound is individual and appropriately named for every situation.

For instance, shoot off a classic “PPFTT” during dinner time with the family. That is ensured to get you the attention you deserve. Unless your family is deaf, you will get a response guaranteed or your money back!

PPFTT
From Fart You App

However, dinner time is not the only appropriate place for the Fart You app. Maybe you are visiting with your Grandma or Aunt and need to lighten the mood with the “Old Lady” fart.

OLD LADY
From Fart You App

Above all, the applications of this practical joke app are infinite and the joy is endless. Everyone loves farts and you can be the center of attention with the Fart You app.

You can see the initial release of the Fart You app here.

If you want to download more CPU check out this app.

I have a new Tic Tac Toe app. You can download the game from the Google Play store here or from the Amazon app store here.

Review of The Dichotomy of Leadership

Book written by: Jocko Willink and Leif Babin

The Dichotomy of Leadership lays out 12 major aspects of leadership where people must find balance. Each chapter touches a dichotomy between taking control in some aspect and letting go. The book is a sequel to their first one “Extreme Ownership”. Throughout the read, the authors reference their first book by showing that being too controlling, taking too much ownership, or basically swinging the leadership pendulum too much in any direction will have a negative effect. Here are three points I want to highlight where I want to improve on.

Big Takeaways

First, an aspect of the dichotomy is to have discipline and structure but with grace. While a schedule and flow that is consistent is helpful, humans are not robots. Too much discipline will cause people to shutdown or leave. It’s counter-intuitive to hear that too much discipline is bad from former military members however, that is the truth.

The second point is to have the same relationship with every boss you’re under. The goal here is to have your boss trust you, have them value your opinion and have them give you what you need to accomplish your mission / tasks / goals. For me, this is the most difficult because it requires me to change and adapt to my boss. If I don’t agree with something, I have to adapt to give my boss what he / she needs so that I can complete the mission while also meeting the requirements of my leadership. This brings me to last aspect of showing humility and strength.

Finally, without humility and strength a leader is hard to follow. It makes me think of a saying popularized by Teddy Roosevelt, “Speak softly and carry a big stick.” This dichotomy truly can apply to all aspects of leadership.

In summary I wholeheartedly recommend this book for all leaders. Every adult can apply principles of this book to their work life, various organizations and their personal relationships.

You can find “The Dichotomy of Leadership” wherever books are sold. Here is the book’s listing at Echelon Front’s website: https://echelonfront.com/dichotomy-of-leadership/. Echelon Front is the name of the organization the authors are from and are the companies founders.

Here you can check out my previous book review post: “8 Seconds of Courage