June 20, 2025
Well, I decided to rewrite the entire project. Why? Reviewing it, I noticed many points I didn't understand and some workarounds. I felt like chatgpt had done almost all the work, which bothered me. So, I decided to rewrite the project from scratch, changing a few things without chatgpt's help, using ideas from the old version as a base and also new ones.
I changed the way the board was rendered. I added colors and a table-like rendering. I also built the logic for player names. It took me a while to figure out how the lipgloss and bubbles packages worked.
I implemented the timing logic for each player. I'm focusing more on the server side, developing most of the features and creating a simple client implementation. However, I'll focus on improving the client UI later.
I fixed some errors related to naming and logic. I also created the handler package to handle messages and actions corresponding to each message type. At the same time, I separated some functions and organized them, such as logic.Moves.
I took the opportunity to start working on the timing logic.
I fixed numerous bugs, mainly when closing the connection when the client disconnects. The channel closing logic was confusing and incorrect. I also improved some logic, such as GetPlayer.
I made changes to the project structure; something like pkg and model are located at the root of the project.
I expanded the message the server sends to the client, a prelude to what comes next.
I also created some unit tests for the functions in the logic package; I will follow this principle from now on.
Update readme file
v0.1 release
A terminal-based text editor written in Go. A research project.
Fixed the error that was occurring when rendering the board for the black pieces. I also started the logic to check the resulting actions of the moves (check, checkmate).
As I expected, the bug occurred due to the notation used. Fix this. It also improves the structure of messages between the server and client and the screen rendering on the client. However, there is a bug in the connection, as the server sometimes claims a timeout on the client.
I separated the logic for sending and reading messages and created the net package to handle all functionality related to the game's connection.
I also created the basic game logic, allowing for the sending of moves and updating each player's board as the game progresses. However, I have a bug in the move validation, something related to the notation used in the game. I'll take a deeper look at the package documentation later.
I'm rewriting some things, creating new packages, improving the game's logic, separating code blocks and logic.
Fix the timeout bug between client and server. The client returns to the server timeout, which ended the connection. The error was in the if IsGame of ./client/core that defined the PingHandler several times, generating mismatch between teams. It took me a while to realize, good thing I also improved some things besides that.
I tried to create a logic for client communication with the server. However, it is a bit broken, there is some error in the client that generates a timeout. I will look into this later.
I separated the Game struct from the game package. Create a models package. It helped with the project's structure and readability. I had to adapt the rest of the code to this change.
I also made a small improvement to the rendering of the board in the client part.
💡 I went back to keeping the client and server in the same project. I decided this because of some details related to the hackclub. Also, there are many packages that would be repeated between the two.
📌 I improved and fixed the ping/pong logic. There was an error in this system that I hadn't noticed. It took a while to fix. And guess what? It was all because I was using a snippet generated by chatgpt, which was wrong 😭. Well, I looked at the websocket documentation and fixed it myself. Do it yourself 💪🏼
I decided to improve the disconnection logic between players and the server. When a player is disconnected, the other is notified and the game is closed.
I remade the general structure of the project. I separated the client from the server and created two different projects. For now, I will develop the server
I slightly restructured the project. I changed the concept of rooms for games, I believe it is better both for understanding the code and for the development of the project itself. I corrected some bad points in the , such as the creation of rooms (games) and the boad. I redid some sections. I also added the functionality that if the player disconnects, the other is notified.
Initial concepts.
Basic server structure and rudimentary logic of rooms and players. Also a simple client for testing. I'll probably rewrite some things. Some points of the project, for me, are botched, so I'll take a look at them later and rebuild them.
An online terminal chess game, written in go. You can connect with another player and play a game of chess. Why am I building this? I like chess and using the terminal.
Versão final.
Podemos salvar as alterações feitas em arquivos
Agora, ao gerar o executavel, pode-se abrir e ler arquivos. Caso tais
arquivos sejam modificados, o editor não poderá ser fechado, apenas se o
arquivo for salvo(essa funcionalidade ainda não existe) ou as modificações forem desfeitas.
Criação de uma statusbar superior, ela fica no canto superior direito. Mostra mensagens como: nome do arquivo, se foi modificado ou não e localização
Criação da função responsável pela tecla Delete.
Criei as funções responsáveis por realizar a quebra de linha (enter) e apagar o texto (backspace)
Um editor de texto minimalista, inspirado no Neovim, desenvolvido em Go e projetado para ser utilizado diretamente no terminal.
This was widely regarded as a great move by everyone.