// draw the piece on the canvas func (self *MainWindow) DrawPiece(cr *cairo.Context, x, y float64, color []float64) { x, y = self.getPiecePosition(x, y) x = x + 40 y = y + 30 cr.Arc(x, y, 20, 0, 2*3.14) cr.SetSourceRGB(color[0], color[1], color[2]) cr.Fill() }