 	### 
 	It draws a character at given row and column
 	Returns the width of the character in number of blocks
+	@param 	ch 	String 	A character to draw
+	@param 	row Number 	Current character's row
+	@param 	col Number 	Current character's column
 	###
 	drawCharacter: (ch, row, col) ->
 		# Lowercase the character



class IsoBlocks
	origin_x: 0
	origin_y: 0
	offset_x: 0
	offset_y: 0
	character_spacing: 0
	current_cube_index: 0

	# Pre-generated array of cubes which are used throughout.
	cubes: []

	# A HTML string template for a block
	cube_template: '<div class="iso_block @color unused" style="left:@leftpx; top:@toppx"></div>'

	constructor: ->
		@preCreateCubes 450

	generate: (s, start_x, start_y) ->
		#cos = Math.cos(-30 * Math.PI /180)
		#sin = Math.sin(-30 * Math.PI /180)
		@current_cube_index = @cubes.length - 1

		# Hide all cubes and reset color
		for cube in @cubes
			$(cube).addClass('unused')#.removeClass('iso_color_yellow iso_color_green')
			#$(cube).css 'top', parseInt($(cube).css('top'), 10) - 400
		@origin_x = start_x
		@origin_y = start_y
		current_row = 0
		current_col = 0

		for ch, index in s
			current_col += @drawCharacter ch, current_row, current_col


		# Return the character width
		current_ch.length

	### 
	@param 	cube_count	Number 	Number of cubes to pre-generate
	###
	preGenerateCubes: (cube_count) ->
		html_string = ''
		for i in [1...cube_count]
			current_cube = @cube_template
