Menu

Home

Viktor Mlej

Welcome to your wiki!

This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].

The wiki uses Markdown syntax.

Project Members:


Discussion

  • Viktor Mlej

    Viktor Mlej - 2018-01-16

    // How does a Robot know where the bigger block is?

    // place mark under Karel if block before is bigger
    // than block of brick on left

    command mark-bigger begin
    unmark
    if is brick then
    take
    move-left
    if is brick then
    take
    move-right
    mark-bigger
    put
    move-left
    put
    move-right
    else
    move-right
    mark-bigger
    put
    mark
    *if
    *if
    end

    command move-left begin left-side walk right-side end
    command move-right begin right-side walk left-side end

     

    Last edit: Viktor Mlej 2018-01-16
  • Viktor Mlej

    Viktor Mlej - 2018-01-16

    Example, how to sort blocks:

    // place mark under Karel if block before is bigger
    // than block of brick on left
    command mark-bigger begin unmark
    if is brick then
    take move-left
    if is brick then
    take move-right
    mark-bigger
    put move-left put move-right
    else
    move-right
    mark-bigger
    put mark
    *if
    *if
    end

    command move-left begin left-side walk right-side end
    command move-right begin right-side walk left-side end
    command a-f begin left-side 2 end

    // switch block of bricks with left block
    begin switch-left begin
    while is brick work
    take left-side walk left-side
    put left-side walk left-side
    *while
    move-left
    while is brick work take move-right put move-left *while
    a-f
    while is brick work take a-f put a-f *while
    a-f
    end

    // sort block of bricks from bigger to smaller
    command sort-blocks begin
    while is brick work move-right *while move-left
    while is brick work
    move-left if is brick then move-right
    mark-bigger
    if is mark then switch-left else move-left *if
    *if
    *while
    move-right 2
    end

     

    Last edit: Viktor Mlej 2018-01-16
  • Viktor Mlej

    Viktor Mlej - 2018-04-27

    Maze program with recursion in Karel 3DGL version 3.
    Look at picure, or Wiki on Karel 3D without WebGL here in Sourceforge.
    Include same example in TXT and on YouTube.

     

    Last edit: Viktor Mlej 2018-04-27
  • Viktor Mlej

    Viktor Mlej - 2018-04-27

    Karel 3D original historical manuals in Slovak language from years 1987 - 1990 in JPG

     

Log in to post a comment.

MongoDB Logo MongoDB