mirror of
https://github.com/mfocko/blog.git
synced 2024-11-10 08:19:07 +01:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
"use strict";(self.webpackChunkfi=self.webpackChunkfi||[]).push([[354],{50476:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>l,default:()=>x,frontMatter:()=>r,metadata:()=>d,toc:()=>c});var i=n(85893),s=n(11151);const r={id:"seminar-04",title:"4th seminar",description:"Robot in a maze.\n",last_update:{date:new Date("2023-03-13T00:00:00.000Z")}},l=void 0,d={id:"bonuses/seminar-04",title:"4th seminar",description:"Robot in a maze.\n",source:"@site/c/bonuses/04.md",sourceDirName:"bonuses",slug:"/bonuses/seminar-04",permalink:"/c/bonuses/seminar-04",draft:!1,unlisted:!1,editUrl:"https://github.com/mfocko/blog/tree/main/c/bonuses/04.md",tags:[],version:"current",lastUpdatedAt:1678665600,formattedLastUpdatedAt:"Mar 13, 2023",frontMatter:{id:"seminar-04",title:"4th seminar",description:"Robot in a maze.\n",last_update:{date:"2023-03-13T00:00:00.000Z"}},sidebar:"autogeneratedBar",previous:{title:"3rd seminar",permalink:"/c/bonuses/seminar-03"},next:{title:"5th and 6th seminar",permalink:"/c/bonuses/seminar-05-06"}},h={},c=[{value:"Introduction",id:"introduction",level:2},{value:"Hard requirement",id:"hard-requirement",level:2},{value:"Example of run",id:"example-of-run",level:2},{value:"Bonus part",id:"bonus-part",level:2},{value:"Easter eggs",id:"easter-eggs",level:2},{value:"Submitting",id:"submitting",level:2}];function o(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.admonition,{type:"caution",children:(0,i.jsxs)(t.p,{children:["Deadline for the submission of the bonus is ",(0,i.jsx)(t.strong,{children:"March 23th 24:00"}),"."]})}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["In case you have any questions, feel free to reach out either by email, Discord\nor just by submitting an issue ",(0,i.jsx)(t.a,{href:"https://gitlab.fi.muni.cz/xfocko/kb/-/issues/new",children:"here"}),"."]})}),"\n",(0,i.jsx)(t.p,{children:"For this bonus you can get 3 K\u20a1 and another 0.5 K\u20a1 for the bonus part of it."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"pathname:///files/c/bonuses/04.tar.gz",children:"Source"})}),"\n",(0,i.jsx)(t.h2,{id:"introduction",children:"Introduction"}),"\n",(0,i.jsx)(t.p,{children:"In this task you are given a 2D map for a robot. The map contains multiple markers:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"^v<>"})," - which denote the directions the robot will be facing when he steps into\nthe cell or starts on it."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"K"})," - denotes the key."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"T"})," - denotes the treasure."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["In case robot lands at the beginning on unknown field, e.g. ",(0,i.jsx)(t.code,{children:"."})," in the tests, he\nfaces the direction that is given through the parameter."]}),"\n",(0,i.jsxs)(t.p,{children:["Your task is to write the ",(0,i.jsx)(t.code,{children:"walk"})," function that returns end result of the walk.\nWalk can end in multiple ways:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"FOUND_TREASURE"})," - when you find the treasure"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"FOUND_KEY"})," - when you find the key"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"OUT_OF_BOUNDS"})," - when the robot falls off the map"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"INFINITE_LOOP"})," - in case you will implement the bonus"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"NONE"})," - which is used right now as a default return in the skeleton, has no meaning\nlater on"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"hard-requirement",children:"Hard requirement"}),"\n",(0,i.jsx)(t.p,{children:"There is only one hard requirement that tests cannot check
|