src/Alg/Turing/Machine.php
public function showTape( $tape )
	{
		for( $i=0; $i<strlen( $tape ); $i++ )
		{
			$sign = substr( $tape, $i, 1 );
			if( $i == $this->pointer )
				$lines[] = "<td style='background: #FF7F7F'>".$sign."</td>";
			else
				$lines[] = "<td>".$sign."</td>";
		}
//		return "<code>(".$this->state.") ".implode( "", $lines)."</code><br>";
		return "<tr><td>(".$this->state.")</td>".implode( "", $lines )."</tr>";
	}
public function showTape( $tape )
	{
		for( $i=0; $i<strlen( $tape ); $i++ )
		{
			$sign = substr( $tape, $i, 1 );
			if( $i == $this->pointer )
				$lines[] = "<td style='background: #FF7F7F'>".$sign."</td>";
			else
				$lines[] = "<td>".$sign."</td>";
		}
//		return "<code>(".$this->state.") ".implode( "", $lines)."</code><br>";
		return "<tr><td>(".$this->state.")</td>".implode( "", $lines )."</tr>";
	}
public function showTape ( $ tape ) { for ( $ i = 0 ; $ i < strlen ( $ tape ) ; $ i ++ ) { $ sign = substr ( $ tape , $ i , 1 ) ; if ( $ i == $ this -> pointer ) $ lines [ ] = "<td style='background: #FF7F7F'>" . $ sign . "</td>" ; else $ lines [ ] = "<td>" . $ sign . "</td>" ; } //		return "<code>(".$this->state.") ".implode( "", $lines)."</code><br>";
 return "<tr><td>(" . $ this -> state . ")</td>" . implode ( "" , $ lines ) . "</tr>" ; }
Generates HTML Visualisation of current tape.
@access		public
@param		string		$tape			current tape
@return		string
Generates HTML Visualisation of current tape .