/ Java

Drawing a YinYang symbol in Java

The Taijitu symbol (sometimes referred to Yin and Yang symbol) is a geometric figure and the universal symbol of the religion of Taoism.

In a recent project, where a group of students had the task to implement a Go Board game with a simple AI in Java, the idea came up to symbolize the two players using the Taijitu symbol. The upper color of the symbol is showing which color you are playing.

The first idea was to use a static image and display it on the client GUI. However, as it is quite easy to implement this basic geometric figure I wrote a small class able to draw the Yin Yang symbol: