Show HN: Phive, a Gomoku-like game to play with friends or solo

Hacker News Top Products

Summary

Phive is a Gomoku-like web game where players take turns placing and moving pieces adjacent to others, aiming to get five in a row. Available to play with friends or solo at phive.app.

In 2025, my family and I had a long streak of playing a Gomoku &#x2F; Go Bang &#x2F; five-in-a-row based game called OK Play. I built a web version so that we could play any time we wanted (i.e. on our phones after kiddos went to sleep).<p>The first player to get five-in-a-row (horizontally, vertically, or diagonally) wins. In the first phase of play, players take turns placing their pieces next to existing pieces (always edge-to-edge; you can&#x27;t place a piece with only a corner-to-corner connection). After players exhaust their pieces, play moves into the movement phase: you pick up an existing piece you own and place it according to the previous placement rules. During the movement phase, you cannot move a piece that would leave other pieces disconnected. Play continues in player order until someone wins.<p>I wrote the app using Elixir&#x27;s Phoenix framework with Daisy UI &#x2F; Tailwind CSS for styling. The app is deployed on Gigalixir via its generous free plan. I am by no means a frontend developer &#x2F; designer, so there&#x27;s for sure better ways to implement things than what I have here. I mostly focused on making it mobile friendly and getting it to support light and dark mode. There likely exists browser &#x2F; device specific bugs, since we&#x27;ve only tested it out on our phones (iPhone 13 Pro, Safari &#x2F; Chrome) and my computer (MacBook Pro, Safari). Happy to hear any suggestions, frontend or otherwise, if you have them!<p>Developing this has been a real journey. Highlights have included learning about Gomoku and its variants, articulation points (and Trajan&#x27;s algorithm for strongly connected components), and the Monte Carlo tree search algorithm (for the intermediate level &quot;AI&quot; mode I&#x27;ve recently added for single-player use). Lowlights have all been CSS related.<p>I&#x27;d love to add a &quot;matchmaking&quot; mode in the future. I haven&#x27;t really looked too much into the mechanics for how that&#x27;s usually done though - it&#x27;ll be a great learning opportunity!
Original Article
View Cached Full Text

Cached at: 06/03/26, 09:44 AM

# Phive Source: [https://phive.app/](https://phive.app/) ### Placing Pieces Take turns placing one piece at a time\. New pieces must be adjacent \(up, down, left, or right\) to an existing piece\. Corner\-to\-corner is not allowed\. Each new piece connects to existing pieces on a side\. ❯ ### Moving Pieces Once all pieces are placed, take turns moving your pieces\. Pieces cannot be moved if removing them would leave any pieces disconnected from the other pieces\. In the bottom row here, the middle piece cannot be moved because it would leave the right\-most piece disconnected\. ❮❯ ### How to Win Get 5 of your pieces in a row horizontally, vertically, or diagonally\. ❮

Similar Articles