WEBVTT

00:00.420 --> 00:08.460
Now that we have our Eutelsat H and P I want to write some more functions for it.

00:08.610 --> 00:14.060
But first I want to go over how to open the door.

00:14.140 --> 00:14.950
You're needed.

00:14.970 --> 00:18.830
OS is Konsole using Eclipse.

00:19.200 --> 00:28.530
So so so far we've only used the built in console but there are certain features that we'd like to use

00:28.530 --> 00:31.690
that this console can't do.

00:31.920 --> 00:34.980
And your net native OS is console can.

00:35.160 --> 00:44.910
So how to run your program through the native console is what I want to offer.

00:45.180 --> 00:58.710
So for Windows users only I want to start with you here is the external tools configuration and you

00:58.710 --> 01:03.390
want to hit external tools configurations like this.

01:03.470 --> 01:03.850
OK.

01:03.990 --> 01:14.330
So that in these new configuration are for it probably start like this.

01:14.330 --> 01:15.790
I was doing some testing for.

01:15.810 --> 01:18.680
So you probably don't have any.

01:18.680 --> 01:21.140
So does it right and then new.

01:21.650 --> 01:30.170
And for your configuration you want to give it a name and you can call mine command prompt like this

01:33.220 --> 01:45.150
and in your locations you want to type this see on slash windows slash system

01:48.470 --> 02:05.480
to slash command C indeed c or wherever this is on your system and for your working directory type dollar

02:05.480 --> 02:06.230
sign.

02:06.260 --> 02:09.470
Open curly brace workspace

02:11.510 --> 02:16.430
underscore L and then slash.

02:16.490 --> 02:29.420
Project name for this one hangman and this and close race and for arguments you want to type slash capital

02:29.420 --> 02:33.430
C and then open quotes start

02:36.560 --> 02:43.830
and then space dollar sign looping clearly raise system

02:46.910 --> 02:55.900
score pass Colon's see indeed you see close Kerley race.

02:56.380 --> 03:06.660
Slash capital K space dot slash debug slash your project names.

03:06.680 --> 03:15.910
In this case saying mend it easy and enclose the quotes OK and hit apply.

03:16.280 --> 03:18.820
And then after that don't it run yet.

03:18.830 --> 03:20.880
Hit close.

03:21.590 --> 03:27.380
I'm not going to apply because I'm on a Mac so this doesn't this doesn't actually this won't work for

03:27.380 --> 03:28.810
me.

03:28.840 --> 03:36.670
I'm close but you should apply and then close and then on your project.

03:36.740 --> 03:39.920
Right click and hit properties.

03:42.440 --> 03:47.740
And in settings under miscellaneous.

03:48.650 --> 03:54.710
You should try this dash.

03:54.910 --> 04:12.190
Static dash libs see space Dasch static dash lib STDs C++ and hit apply again in emacs.

04:12.190 --> 04:19.500
I don't have to do this but the reason why we're doing this is if you ever tried to run your program

04:20.790 --> 04:30.580
directly through your file system then noticed that it might have given you an error and that error

04:31.330 --> 04:35.760
says it can't find some library or something.

04:35.760 --> 04:37.920
OK so this will actually fix that.

04:37.950 --> 04:43.160
So hit apply and so it hit ok again.

04:43.180 --> 04:47.200
I don't need to do this and cancel and then to run it.

04:47.620 --> 04:50.750
You should hit this external tools button.

04:51.960 --> 04:58.320
And that should open your new command prompt configuration.

04:59.430 --> 05:08.280
And you should see the actual game now in your command console so for Mac users what we need to do is

05:08.280 --> 05:23.110
say run and say run configurations and then here in C++ the Asians you should type slash user slash

05:23.110 --> 05:27.810
been slash open.

05:28.370 --> 05:39.900
And then arguments tied to ASH a slash applications slash Tillie's

05:42.400 --> 05:47.330
slash terminal dot

05:49.880 --> 06:00.640
space dash or Dortch slash debug slash hangman and hit apply

06:03.110 --> 06:16.690
and in common you want to and tick this outkicked con. take that apply and you can try to run so noticed

06:16.700 --> 06:26.080
they opened the console or this terminal and in Mac land and it's running our game can of say hello

06:26.140 --> 06:30.020
rune is the secret phrase it's running the game.

06:30.220 --> 06:42.830
OK so you may ask why we did this at all and that is because I want to be able to clear the screen.

06:44.040 --> 06:50.000
So you do that we're going to go back to our tails

06:54.120 --> 06:58.460
to the H and add function.

06:58.470 --> 07:07.040
So it's called voyde clear screen this name.

07:07.130 --> 07:07.750
Implement it.

07:07.820 --> 07:10.940
It's implemented down here.

07:12.690 --> 07:15.990
FOID clear screen

07:18.440 --> 07:21.050
that.

07:21.230 --> 07:29.990
And again there's going to be two different things for the two different two major platforms for Windows

07:31.100 --> 07:36.140
when you type system in quotes.

07:36.330 --> 07:37.430
CLX

07:40.630 --> 07:44.190
like it says it's for Windows.

07:45.930 --> 07:57.890
And for Mac people like myself type system and then clear.

07:58.540 --> 08:04.980
So now that we have that this will actually clear the screen.

08:04.990 --> 08:07.130
This didn't work.

08:07.200 --> 08:15.620
This doesn't work in the native eclipse console but this will work on your native console.

08:15.810 --> 08:27.240
And so we go back to Hank and to draw board in I'm I'm really I'm actually go to there I'm just sitting

08:27.240 --> 08:37.130
command and maybe the Windows key if you're on Windows then click and was going to see a clear screen

08:37.200 --> 08:37.930
drop toward

08:42.540 --> 08:43.370
And we're going to run it

08:52.800 --> 08:53.700
there.

08:54.280 --> 08:58.330
So hello everyone.

08:58.750 --> 09:06.130
And I noticed that it actually cleared the screens so there's no extra output that was there before.

09:06.270 --> 09:07.060
OK.

09:07.330 --> 09:08.980
So which is nice.

09:09.040 --> 09:17.830
That's the whole point of doing this for you may notice if you're on a Mac if you scroll up didn't actually

09:17.860 --> 09:24.170
clear the screen all it just put enough is enough spaces that it doesn't show.

09:24.300 --> 09:25.190
OK.

09:25.450 --> 09:32.040
On Windows I think it'll actually clear the screen properly and that's it for your screen.

09:32.040 --> 09:33.920
So this is actually kind of nice.

09:33.970 --> 09:37.570
Makes it a bit more aesthetically pleasing.

09:38.380 --> 09:43.250
There's one other function I want to add to you.

09:43.270 --> 09:55.300
And we'll be using it later but it's going to hide it now and it's going to comb for each or he press

10:00.010 --> 10:08.080
and so do essentially is pause the pause the game essentially or pause the

10:10.790 --> 10:17.580
kind of block on input and you have to type a type of character to kind of continue.

10:17.810 --> 10:20.660
And when you're using it in this game.

10:20.950 --> 10:25.880
But we will be using it in the next game we do.

10:25.910 --> 10:28.090
So I can implement this now.

10:29.740 --> 10:38.840
In or for the press and again there's going to be two different implementations so for Windows users

10:39.650 --> 10:49.400
it's going to be system pause this is Windows only.

10:49.690 --> 10:56.230
So you got the easy on the Mac users we have that bit more tricky.

10:56.230 --> 11:11.990
So you say System read dash and one space dash -- dash P and then backslash quote again.

11:12.130 --> 11:21.100
Press any key to you.

11:21.390 --> 11:26.540
Slash quote and then semi-colon echo

11:29.300 --> 11:36.310
so it's a bit more tricky for us Mac users but hopefully you just kind of copy this line and don't really

11:36.310 --> 11:37.900
think about it too much.

11:37.900 --> 11:43.700
I'm not going to use it in hangman but I will be using it in the Battleship game.

11:43.730 --> 11:46.710
OK so if you want to see what this does.

11:46.840 --> 11:52.010
Feel free to put this somewhere in hangman and see what it does.

11:52.090 --> 11:58.150
So that's it for hangman so I'll see you in the next section.
