@@ -74,7 +74,7 @@ class TuringMachine extends Component {
7474 let cellStart , cellEnd ;
7575 cellStart = 50 + ( 1 - cellCount ) / 2 ;
7676 cellEnd = 50 + ( cellCount - 1 ) / 2 ;
77- this . setState ( { cellStart, cellEnd} ) ;
77+ this . setState ( { cellStart, cellEnd, state : - 1 } ) ;
7878 }
7979
8080 handleStart = ( ) => {
@@ -136,53 +136,58 @@ class TuringMachine extends Component {
136136 visualize = { this . handleStart }
137137 onAlgoChanged = { this . setAlgo }
138138 onReset = { this . handleReset }
139+ setInput1 = { this . setInput1 }
140+ setInput2 = { this . setInput2 }
139141 />
140142
141- < div className = 'row' >
142- < div className = "input-group mt-2 col-3" >
143- < input type = "text" id = 'inputText1' className = "form-control" placeholder = "Input Binary"
144- aria-label = "Username"
145- aria-describedby = "basic-addon1"
146- onChange = { this . setInput1 }
147- />
148- </ div >
149- < div className = "input-group mt-2 col-3" >
150- < input type = "text" id = 'inputText1' className = "form-control" placeholder = "Input Binary 2"
151- aria-label = "Username"
152- aria-describedby = "basic-addon1" />
153- </ div >
154- </ div >
143+ { /* <div className='row'>*/ }
144+ { /* <div className="input-group mt-2 col-3">*/ }
145+ { /* <input type="text" id='inputText1' className="form-control" placeholder="Input Binary"*/ }
146+ { /* aria-label="Username"*/ }
147+ { /* aria-describedby="basic-addon1"*/ }
148+ { /* onChange={this.setInput1}*/ }
149+ { /* />*/ }
150+ { /* </div>*/ }
151+ { /* <div className="input-group mt-2 col-3">*/ }
152+ { /* <input type="text" id='inputText1' className="form-control" placeholder="Input Binary 2"*/ }
153+ { /* aria-label="Username"*/ }
154+ { /* aria-describedby="basic-addon1"/>*/ }
155+ { /* </div>*/ }
156+ { /* </div>*/ }
155157
156158 < center >
157- < h3 > Turing Machine</ h3 >
158- < Ribbon
159- strip = { this . state . strip }
160- midCell = { this . state . midCell }
161- cellCount = { this . state . cellCount }
162- cellStart = { this . state . cellStart }
163- cellEnd = { this . state . cellEnd }
164- > </ Ribbon >
165- < button
166- className = 'btn btn-warning m-3'
167- onClick = { this . handleLeftShift }
168- >
169- < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" fill = "currentColor"
170- className = "bi bi-caret-left-square-fill" viewBox = "0 0 16 16" >
171- < path
172- d = "M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm10.5 10V4a.5.5 0 0 0-.832-.374l-4.5 4a.5.5 0 0 0 0 .748l4.5 4A.5.5 0 0 0 10.5 12z" />
173- </ svg >
174- </ button >
175- < button
176- className = 'btn btn-warning m-3'
177- onClick = { this . handleRightShift }
178- >
179- < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" fill = "currentColor"
180- className = "bi bi-caret-right-square-fill" viewBox = "0 0 16 16" >
181- < path
182- d = "M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm5.5 10a.5.5 0 0 0 .832.374l4.5-4a.5.5 0 0 0 0-.748l-4.5-4A.5.5 0 0 0 5.5 4v8z" />
183- </ svg >
184-
185- </ button >
159+ < br />
160+ < div className = 'bg-info' >
161+ { /*<h3>Turing Machine</h3>*/ }
162+ < Ribbon
163+ strip = { this . state . strip }
164+ midCell = { this . state . midCell }
165+ cellCount = { this . state . cellCount }
166+ cellStart = { this . state . cellStart }
167+ cellEnd = { this . state . cellEnd }
168+ > </ Ribbon >
169+ < button
170+ className = 'btn btn-warning m-3'
171+ onClick = { this . handleLeftShift }
172+ >
173+ < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" fill = "currentColor"
174+ className = "bi bi-caret-left-square-fill" viewBox = "0 0 16 16" >
175+ < path
176+ d = "M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm10.5 10V4a.5.5 0 0 0-.832-.374l-4.5 4a.5.5 0 0 0 0 .748l4.5 4A.5.5 0 0 0 10.5 12z" />
177+ </ svg >
178+ </ button >
179+ < button
180+ className = 'btn btn-warning m-3'
181+ onClick = { this . handleRightShift }
182+ >
183+ < svg xmlns = "http://www.w3.org/2000/svg" width = "16" height = "16" fill = "currentColor"
184+ className = "bi bi-caret-right-square-fill" viewBox = "0 0 16 16" >
185+ < path
186+ d = "M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm5.5 10a.5.5 0 0 0 .832.374l4.5-4a.5.5 0 0 0 0-.748l-4.5-4A.5.5 0 0 0 5.5 4v8z" />
187+ </ svg >
188+
189+ </ button >
190+ </ div >
186191 < br />
187192
188193 < div className = 'row' >
@@ -193,14 +198,14 @@ class TuringMachine extends Component {
193198 />
194199 </ div >
195200 < div className = 'col-4' >
196- < span className = 'badge badge -light text-lg-center' id = 'stepsText' >
201+ < span className = 'bg -light p-2 font-weight-bold text-lg-center rounded-3 ' id = 'stepsText' >
197202 Details goes here
198203 </ span >
199204 </ div >
200205 < div className = 'col-4' >
201- < textarea disabled className = "form-control" id = "Textarea1" rows = "3" >
206+ { /* <textarea disabled className="form-control" id="Textarea1" rows="3">*/ }
202207
203- </ textarea >
208+ { /* </textarea>*/ }
204209 </ div >
205210 </ div >
206211 </ center >
0 commit comments